IntlService
A service which provides internationalization methods and is bound to a specific locale.
Name | Type | Default | Description |
---|---|---|---|
locale |
|
The locale that will be used by the internationalization methods. |
Constructors
IntlService
(locale: string)
Creates a new instance of the internationalization service.
Parameters
locale
string
The locale that will be used by the internationalization methods.
Methods
dateFieldName | ||||||
---|---|---|---|---|---|---|
Returns a localized date field name based on specific | ||||||
| ||||||
|
dateFormatNames | ||||||
---|---|---|---|---|---|---|
Returns the day names from the current locale based on the option. | ||||||
| ||||||
|
firstDay | ||||
---|---|---|---|---|
Returns the first day index, starting from Sunday. | ||||
|
format | |||||||||
---|---|---|---|---|---|---|---|---|---|
Formats a string with placeholders such as | |||||||||
| |||||||||
|
formatDate | |||||||||
---|---|---|---|---|---|---|---|---|---|
Converts a | |||||||||
| |||||||||
|
formatNumber | |||||||||
---|---|---|---|---|---|---|---|---|---|
Converts a | |||||||||
| |||||||||
|
numberSymbols | ||||
---|---|---|---|---|
Returns the number symbols from the current locale. | ||||
|
parseDate | |||||||||
---|---|---|---|---|---|---|---|---|---|
Converts a string to a | |||||||||
| |||||||||
|
parseNumber | |||||||||
---|---|---|---|---|---|---|---|---|---|
Converts a string to a | |||||||||
| |||||||||
|
splitDateFormat | ||||||
---|---|---|---|---|---|---|
Splits the date format into objects which contain information about each part of the pattern. | ||||||
| ||||||
|
toString | |||||||||
---|---|---|---|---|---|---|---|---|---|
Converts an object to a string based on the specified format. | |||||||||
| |||||||||
|