Class: Localization

localization~ Localization

new Localization(locale, numberOptionsopt, dateOptionsopt)

All members are localizers (conform to localizerInterface) with exception of get, set, and localizer constructors which are named (by convention) ending in "Formmatter".

The application developer is free to add localizers and localizer factory methods. See the construct convenience method which may be helpful in this regard.

Parameters:
Name Type Attributes Description
locale
numberOptions object <optional>
dateOptions object <optional>

Methods

construct(localizerName, {Constructor, {factoryOptions}) → {localizerInterface}

Creates a localizer from a localizer factory object using the default locale.

Performs the following actions:

  1. Binds Constructor to locale.
  2. Adds the newly bound constructor to this object (for future reference) with the key "NameFormatter" (where "Name" is the localizer name, all lower case but with an initial capital).
  3. Uses the newly bound constructor to create a new localized localizer with the provided options.
  4. Adds new localizer to this object via add.
Parameters:
Name Type Description
localizerName string
{Constructor
{factoryOptions} object
Returns:

The new localizer.

Type
localizerInterface