Translator
Translator with the same API as Symfony's.
Derived from https://github.com/willdurand/BazingaJsTranslationBundle which is available under the MIT License. Copyright (c) William Durand william.durand1@gmail.com
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
locale: * |
|
public |
A map of translation keys to their translated values. |
Method Summary
Public Methods | ||
public |
addTranslations(translations: *) |
|
public |
apply(translation: *, input: *): * |
|
public |
convertNumber(number: *): * |
|
public |
pluralPosition(number: *, locale: *): number |
|
public |
pluralize(translation: *, number: *): * |
|
public |
trans(id: *, parameters: *): * |
|
public |
transChoice(id: *, number: *, parameters: *): * |
Public Constructors
public constructor() source
Public Members
public locale: * source
Public Methods
public addTranslations(translations: *) source
Params:
Name | Type | Attribute | Description |
translations | * |
public apply(translation: *, input: *): * source
Params:
Name | Type | Attribute | Description |
translation | * | ||
input | * |
Return:
* |
public pluralPosition(number: *, locale: *): number source
Params:
Name | Type | Attribute | Description |
number | * | ||
locale | * |
public pluralize(translation: *, number: *): * source
Params:
Name | Type | Attribute | Description |
translation | * | ||
number | * |
Return:
* |
public trans(id: *, parameters: *): * source
Params:
Name | Type | Attribute | Description |
id | * | ||
parameters | * |
Return:
* |
public transChoice(id: *, number: *, parameters: *): * source
Params:
Name | Type | Attribute | Description |
id | * | ||
number | * | ||
parameters | * |
Return:
* |