Interface LocaleOptions
@JsType(isNative=true,
namespace="<global>")
public interface LocaleOptions
Mapping for locale
options passed to
Locale constructors.
In addition to the actual mappings, this class implements the builder pattern using enums to create the options easily and in
a type-safe manner. Some enums are shared with other format option builders of the Intl module and may contain
more values than intended for the given method. In that case the allowed values are listed on the method. In all other cases
all enum values are applicable.
var korean = new Locale("ko", localeOptions()
.script("Kore")
.region("KR")
.hourCycle(HourCycle.h23)
.calendar(gregory));
var japanese = new Locale("ja-Jpan-JP-u-ca-japanese-hc-h12");
console.log(korean.baseName, japanese.baseName);
// Expected output: "ko-Kore-KR" "ja-Jpan-JP"
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault LocaleOptionsdefault LocaleOptionsdefault LocaleOptionsdefault LocaleOptionsdefault LocaleOptionsstatic LocaleOptionsdefault LocaleOptionsnumberingSystem(NumberingSystem numberingSystem) default LocaleOptionsnumeric(boolean numeric) default LocaleOptionsdefault LocaleOptionsvoidsetCalendar(String calendar) voidsetCaseFirst(String caseFirst) voidsetCollation(String collation) voidsetHourCycle(String hourCycle) voidsetLanguage(String language) voidsetNumberingSystem(String numberingSystem) voidsetNumeric(boolean numeric) voidvoidvoidsetVariants(String variants) default LocaleOptions
-
Method Details
-
localeOptions
-
setLanguage
-
setScript
-
setRegion
-
setVariants
-
setCalendar
-
setCollation
-
setNumberingSystem
-
setCaseFirst
-
setHourCycle
-
setNumeric
@JsProperty void setNumeric(boolean numeric) -
language
-
script
-
region
-
variants
-
calendar
-
collation
-
numberingSystem
-
caseFirst
-
hourCycle
-
numeric
-