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:
- Binds
Constructor
tolocale
. - 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).
- Uses the newly bound constructor to create a new localized localizer with the provided options.
- Adds new localizer to this object via
add
.
Parameters:
Name | Type | Description |
---|---|---|
localizerName |
string | |
{Constructor |
||
{factoryOptions} |
object |
Returns:
The new localizer.
- Type
- localizerInterface