Gorilla.Utils.Language
Unit Gorilla.Utils.Language.pasClasses
- TGorillaLanguageMap = class ( {System.Generics.Collections}TDictionary<System.string,System.string> )
Constants
- const GORILLA_LANG_EN_US : Integer = $0;
- const GORILLA_LANG_EN_UK : Integer = $1;
- const GORILLA_LANG_DE_DE : Integer = $2;
- const GORILLA_LANG_DE_AT : Integer = $3;
- const GORILLA_LANG_DE_CH : Integer = $4;
- const GORILLA_LANG_DEFAULT : string = "en-us";
- const GORILLA_LANG_MAX : Integer = $4;
Mics. types
- type TGorillaLanguage = integer;
Functions / Procedures
TGorillaLanguageMap
Custom language map to support multilingual fields in components.
Remarks
The hashmap uses the language identifier as key, f.e. "en-us" or the wildcard "*". The value can be any kind of text.Ancestors
Members
Methods
- public procedure FromXml
(
const
ANode :
TMz_XmlElement
)
;
virtual;
Reads translation entries from xml.
- public function ToXml
(
const
ATagName :
string; const
ACreateTag :
Boolean; const
AParent :
TMz_XmlElement
)
: TMz_XmlElement
;
virtual;
Writes all translations to a specific tagname (property-name). Creates a new tag for the property-name, if ACreateTag is true. Creates "text" sub-nodes for each translation and stores translation inside of a CDATA sub-node.
- public procedure Assign
(
ASrc :
TGorillaLanguageMap
)
;
virtual;
Copy all entries from a source language map into this language map.
- public function ToJSON ( ) : TJSONObject ;
- public procedure FromJSON ( AData : TJSONObject ) ;