| Package | asgard.system |
| Class | public final class Lang |
| Inheritance | Lang CoreObject |
import asgard.system.Lang ;
trace( "Lang.ES.toString() : " + Lang.ES.toString() ) ; // es
trace( "Lang.ES.valueOf() : " + Lang.ES.valueOf() ) ; // es
trace( "Lang.ES.toSource() : " + Lang.ES.toSource() ) ; // new asgard.system.Lang("es","Spanish")
trace( "Lang.ES.label : " + Lang.ES.label ) ; // Spanish
trace( "Lang.get('fr') == Lang.FR : " + ( Lang.get("fr") == Lang.FR ) ) ; // true
trace( "Lang.validate('fr') : " + Lang.validate('fr') ) ; // true
trace( "Lang.validate( Lang.FR ) : " + Lang.validate( Lang.FR ) ) ; // true
trace( "Lang.LANGS : " + Lang.LANGS ) ;
// {pl:pl,nl:nl,es:es,tr:tr,it:it,da:da,pt:pt,fi:fi,zh-CN:zh-CN,no:no,ja:ja,de:de,ru:ru,fr:fr,zh-TW:zh-TW,xu:xu,ko:ko,en:en,sv:sv,cs:cs,hu:hu}
trace( "Lang.LANGS.size() : " + Lang.LANGS.size() ) ; // 21
See also
| Property | Defined by | ||
|---|---|---|---|
| label : String = "null"
The label of the current Lang instance.
| Lang | ||
| LANGS : HashMap
[static]
The map of all existing Lang reference in the application.
| Lang | ||
| value : String = "null"
The value of the current Lang instance.
| Lang | ||
| Method | Defined by | ||
|---|---|---|---|
|
Lang(id:String, label:String)
Creates a new Lang instance.
| Lang | ||
|
[static]
Returns a Lang instance with the specified 'id' value.
| Lang | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
[static]
Insert a new key/value entry with a passed-in Lang argument.
| Lang | ||
|
[static]
Removes the specified Lang reference in the static LANGS HashMap.
| Lang | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
size():uint
[static]
Returns the number of Lang reference register in the static LANGE HashMap.
| Lang | ||
|
toSource(indent:int = 0):String
Returns the eden string representation of the object.
| Lang | ||
|
toString():String
Returns the string representation of this instance.
| Lang | ||
|
validate(lang:*):Boolean
[static]
Returns true if the passed value is a valid Lang reference.
| Lang | ||
|
valueOf():String
Returns the value of this instance.
| Lang | ||
| Constant | Defined by | ||
|---|---|---|---|
| CS : Lang
[static]
Indicates the 'Czech' language reference.
| Lang | ||
| DA : Lang
[static]
Indicates the 'Dasnish' language reference.
| Lang | ||
| DE : Lang
[static]
Indicates the 'German' language reference.
| Lang | ||
| EN : Lang
[static]
Indicates the 'English' language reference.
| Lang | ||
| ES : Lang
[static]
Indicates the 'Spanish' language reference.
| Lang | ||
| FI : Lang
[static]
Indicates the 'Finnish' language reference.
| Lang | ||
| FR : Lang
[static]
Indicates the 'French' language reference.
| Lang | ||
| HU : Lang
[static]
Indicates the 'Hungarian' language reference.
| Lang | ||
| IT : Lang
[static]
Indicates the 'Italian' language reference.
| Lang | ||
| JA : Lang
[static]
Indicates the 'Japanese' language reference.
| Lang | ||
| KO : Lang
[static]
Indicates the 'Korean' language reference.
| Lang | ||
| NL : Lang
[static]
Indicates the 'Dutch' language reference.
| Lang | ||
| NO : Lang
[static]
Indicates the 'Norwegian' language reference.
| Lang | ||
| PL : Lang
[static]
Indicates the 'Italian' language reference.
| Lang | ||
| PT : Lang
[static]
Indicates the 'Portuguese' language reference.
| Lang | ||
| RU : Lang
[static]
Indicates the 'Russian' language reference.
| Lang | ||
| SV : Lang
[static]
Indicates the 'Swedish' language reference.
| Lang | ||
| TR : Lang
[static]
Indicates the 'Turkish' language reference.
| Lang | ||
| XU : Lang
[static]
Indicates the 'Other/unknown' language reference.
| Lang | ||
| ZH_CN : Lang
[static]
Indicates the 'Simplified Chinese' language reference.
| Lang | ||
| ZH_TW : Lang
[static]
Indicates the 'Traditional Chinese' language reference.
| Lang | ||
| label | property |
public var label:String = "null"The label of the current Lang instance.
| LANGS | property |
public static var LANGS:HashMapThe map of all existing Lang reference in the application.
| value | property |
public var value:String = "null"The value of the current Lang instance.
| Lang | () | constructor |
public function Lang(id:String, label:String)Creates a new Lang instance.
Parametersid:String — The lang language specified as a lowercase two-letter language code from ISO 639-1. For Chinese, an additional uppercase two-letter country code from ISO 3166 distinguishes between Simplified and Traditional Chinese.
|
|
label:String — The English names of the language.
|
| get | () | method |
public static function get(id:String):LangReturns a Lang instance with the specified 'id' value.
Parametersid:String |
Lang —
a Lang instance with the specified 'id' value.
|
| put | () | method |
public static function put(lang:Lang):*Insert a new key/value entry with a passed-in Lang argument.
Parameterslang:Lang |
* |
| remove | () | method |
public static function remove(lang:Lang):*Removes the specified Lang reference in the static LANGS HashMap.
Parameterslang:Lang |
* |
| size | () | method |
public static function size():uintReturns the number of Lang reference register in the static LANGE HashMap.
Returnsuint — the number of Lang reference register in the static LANGE HashMap.
|
| toSource | () | method |
public override function toSource(indent:int = 0):StringReturns the eden string representation of the object.
Parametersindent:int (default = 0) |
String — the eden string representation of the object.
|
| toString | () | method |
public override function toString():StringReturns the string representation of this instance.
ReturnsString — the string representation of this instance.
|
| validate | () | method |
public static function validate(lang:*):BooleanReturns true if the passed value is a valid Lang reference.
Parameterslang:* |
Boolean — true if the passed value is a valid Lang reference.
|
| valueOf | () | method |
public function valueOf():StringReturns the value of this instance.
ReturnsString — the value of this instance.
|
| CS | constant |
public static const CS:LangIndicates the 'Czech' language reference.
| DA | constant |
public static const DA:LangIndicates the 'Dasnish' language reference.
| DE | constant |
public static const DE:LangIndicates the 'German' language reference.
| EN | constant |
public static const EN:LangIndicates the 'English' language reference.
| ES | constant |
public static const ES:LangIndicates the 'Spanish' language reference.
| FI | constant |
public static const FI:LangIndicates the 'Finnish' language reference.
| FR | constant |
public static const FR:LangIndicates the 'French' language reference.
| HU | constant |
public static const HU:LangIndicates the 'Hungarian' language reference.
| IT | constant |
public static const IT:LangIndicates the 'Italian' language reference.
| JA | constant |
public static const JA:LangIndicates the 'Japanese' language reference.
| KO | constant |
public static const KO:LangIndicates the 'Korean' language reference.
| NL | constant |
public static const NL:LangIndicates the 'Dutch' language reference.
| NO | constant |
public static const NO:LangIndicates the 'Norwegian' language reference.
| PL | constant |
public static const PL:LangIndicates the 'Italian' language reference.
| PT | constant |
public static const PT:LangIndicates the 'Portuguese' language reference.
| RU | constant |
public static const RU:LangIndicates the 'Russian' language reference.
| SV | constant |
public static const SV:LangIndicates the 'Swedish' language reference.
| TR | constant |
public static const TR:LangIndicates the 'Turkish' language reference.
| XU | constant |
public static const XU:LangIndicates the 'Other/unknown' language reference.
| ZH_CN | constant |
public static const ZH_CN:LangIndicates the 'Simplified Chinese' language reference.
| ZH_TW | constant |
public static const ZH_TW:LangIndicates the 'Traditional Chinese' language reference.