fLocale interface
This object provides locale-based processing.
LocaleCodes enumeration
Locale country codes.
The LocaleCodes enumeration has the following constants of type DOMString.
LOCALE_AFRIKAANS = "af"
Afrikaans
LOCALE_ARABIC = "ar"
Arabic
LOCALE_ASSAMESE = "as"
Assamese
LOCALE_AZERBAIJANI = "az"
Azerbaijani
LOCALE_BELARUSIAN = "be"
Belarusian
LOCALE_BULGARIAN = "bg"
Bulgarian
LOCALE_BENGALI = "bn"
Bengali
LOCALE_BOSNIAN = "bs"
Bosnian
LOCALE_CATALAN = "ca"
Catalan
LOCALE_CZECH = "cs"
Czech
LOCALE_WELSH = "cy"
Welsh
LOCALE_DANISH = "da"
Danish
LOCALE_GERMAN = "de"
German
LOCALE_DZONGKHA = "dz"
Dzongkha
LOCALE_EWE = "ee"
Ewe
LOCALE_GREEK = "el"
Greek
LOCALE_ENGLISH = "en"
English
LOCALE_ESPERANTO = "eo"
Esperanto
LOCALE_SPANISH = "es"
Spanish
LOCALE_ESTONIAN = "et"
Estonian
LOCALE_PERSIAN = "fa"
Persian
LOCALE_FINNISH = "fi"
Finnish
LOCALE_FILIPINO = "fil"
Filipino
LOCALE_FAROESE = "fo"
Faroese
LOCALE_FRENCH = "fr"
French
LOCALE_IRISH = "ga"
Irish
LOCALE_GALICIAN = "gl"
Galician
LOCALE_GUJARATI = "gu"
Gujarati
LOCALE_HAUSA = "ha"
Hausa
LOCALE_HEBREW = "he"
Hebrew
LOCALE_HINDI = "hi"
Hindi
LOCALE_CROATIAN = "hr"
Croatian
LOCALE_HUNGARIAN = "hu"
Hungarian
LOCALE_ARMENIAN = "hy"
Armenian
LOCALE_INDONESIAN = "id"
Indonesian
LOCALE_IGBO = "ig"
Igbo
LOCALE_ICELANDIC = "is"
Icelandic
LOCALE_ITALIAN = "it"
Italian
LOCALE_JAPANESE = "ja"
Japanese
LOCALE_GEORGIAN = "ka"
Georgian
LOCALE_KAZAKH = "kk"
Kazakh
LOCALE_KALAALLISUT = "kl"
Kalaallisut
LOCALE_KHMER = "km"
Khmer
LOCALE_KANNADA = "kn"
Kannada
LOCALE_KOREAN = "ko"
Korean
LOCALE_KONKANI = "kok"
Konkani
LOCALE_KIRGHIZ = "ky"
Kirghiz
LOCALE_LINGALA = "ln"
Lingala
LOCALE_LITHUANIAN = "lt"
Lithuanian
LOCALE_LATVIAN = "lv"
Latvian
LOCALE_MACEDONIAN = "mk"
Macedonian
LOCALE_MALAYALAM = "ml"
Malayalam
LOCALE_MOLDOVAN = "mo"
Moldovan
LOCALE_MARATHI = "mr"
Marathi
LOCALE_MALAY = "ms"
Malay
LOCALE_MALTESE = "mt"
Maltese
LOCALE_BURMESE = "my"
Burmese
LOCALE_NORWEGIAN_BOKMAL = "nb"
Norwegian Bokmal
LOCALE_DUTCH = "nl"
Dutch
LOCALE_NORWEGIAN_NYNORSK = "nn"
Norwegian Nynorsk
LOCALE_NORWEGIAN = "no"
Norwegian
LOCALE_OROMO = "om"
Oromo
LOCALE_ORIYA = "or"
Oriya
LOCALE_PANJABI = "pa"
Panjabi
LOCALE_POLISH = "pl"
Polish
LOCALE_PASHTO = "ps"
Pashto
LOCALE_PORTUGUESE = "pt"
Portuguese
LOCALE_ROMANIAN = "ro"
Romanian
LOCALE_RUSSIAN = "ru"
Russian
LOCALE_SINHALA = "si"
Sinhala
LOCALE_SLOVAK = "sk"
Slovak
LOCALE_SLOVENIAN = "sl"
Slovenian
LOCALE_ALBANIAN = "sq"
Albanian
LOCALE_SERBIAN = "sr"
Serbian
LOCALE_SWEDISH = "sv"
Swedish
LOCALE_SWAHILI = "sw"
Swahili
LOCALE_TAMIL = "ta"
Tamil
LOCALE_TELUGU = "te"
Telugu
LOCALE_THAI = "th"
Thai
LOCALE_TONGA = "to"
Tonga
LOCALE_TURKISH = "tr"
Turkish
LOCALE_UKRANIAN = "uk"
Ukranian
LOCALE_URDU = "ur"
Urdu
LOCALE_VIETNAMESE = "vi"
Vietnamese
LOCALE_YORUBA = "yo"
Yoruba
LOCALE_CHINESE = "zh"
Chinese
LOCALE_ZULU = "zu"
Zulu
BreakTypes enumeration
Options for selecting one of the pages adjacent to the current one.
The BreakTypes enumeration has the following constants of type int.
BREAK_CHARACTER = 0
Breaks the string at each character boundary.
BREAK_WORD = 1
Breaks the string at each word boundary.
BREAK_LINE = 1
Breaks the string at each point it would be appropriate to wrap a line.
BREAK_SENTENCE = 1
Breaks the string at each sentence boundary.
countryCode attribute
The country code for this locale.
countryCode
|
Access
|
read-only
|
Returns
|
String
|
countryName attribute
The display name for this country.
countryName
|
Access
|
read-only
|
Returns
|
String
|
break method
Breaks the string into constituent parts. Note that this uses rules specified by Unicode TR29, so might find different boundaries to LD's formatting engine.
breaktypestring
|
Parameters
|
inttype
The type of boundaries to split the string on. Possible values are in fLocale-BreakTypes.
Stringstring
The string to split.
|
Returns
|
DOMString[]. An array containing all the parts of the string, separated at the required boundaries.
|
compare method
Compares two strings in this locale.
comparestring1string2
|
Parameters
|
Stringstring1
The first string to compare.
Stringstring2
The second string to compare.
|
Returns
|
int. This returns 0 if the strings are equal, -1 if string1 sorts before string2, and 1 if string1 sorts after string2.
|
fLocale method
Creates a new fLocale object.
fLocalecountryCode
|
Parameters
|
StringcountryCode
The country code for this locale.
|
Returns
|
fLocale. The newly created fLocale object.
|