Translator
Member Summary
Public Members | ||
public |
formatter: * The underlying ICU MessageFormatter util. |
|
public |
translations: * A map of translation keys to their translated values. |
Method Summary
Public Methods | ||
public |
addTranslations(translations: *) |
|
public |
formatterTypeHandlers(): {"plural": *, "select": *} An extensible entrypoint for extenders to register type handlers for translations. |
|
public |
preprocessParameters(parameters: *): * A temporary system to preprocess parameters. |
|
public |
setLocale(locale: *) |
|
public |
trans(id: *, parameters: {}): * |
Public Members
Public Methods
public addTranslations(translations: *) source
Params:
Name | Type | Attribute | Description |
translations | * |
public formatterTypeHandlers(): {"plural": *, "select": *} source
An extensible entrypoint for extenders to register type handlers for translations.
Return:
{"plural": *, "select": *} |
public preprocessParameters(parameters: *): * source
A temporary system to preprocess parameters. Should not be used by extensions. TODO: An extender will be added in v1.x.
Params:
Name | Type | Attribute | Description |
parameters | * |
Return:
* |
public setLocale(locale: *) source
Params:
Name | Type | Attribute | Description |
locale | * |
public trans(id: *, parameters: {}): * source
Params:
Name | Type | Attribute | Description |
id | * | ||
parameters | {} |
|
Return:
* |