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: