Gets the current locale identifier.
Gets the configuration for the current locale which represents the translation file currently loaded.
Gets the current locale identifier (e.g.: "fr" represents French — the international translation for the language as a whole; "fr-ca" is French (Canada) — represents a localized variation of the French language meant for Canada).
The default is "en-us", which represents English (United States), a language built into the module (doesn't require any translation file).
Gets whether the given locale identifier is available to timecount
.
A language / region locale specifier (e.g. "en-au", "pt-br").
True if a valid locale was provided; false otherwise.
Gets a list with all locale identifiers available to timecount.
An array with all available locale identifiers.
Sets the current timecount language using the specified locale identifier (e.g.: "pt" represents Portuguese — the international translation for the language as a whole; "pt-br" is Portuguese (Brazilian) — represents a localized variation of the Portuguese language meant for Brazil).
A string with a 2 letter language identifier ("en", "es", "pt", etc.) -or- a 5 letter language + region identifier ("en-ca", "pt-ao"). This parameter is case-insensitive. If empty, it will reset the locale to "en".
Generated using TypeDoc
This class manages the internationalization of the module, altering the results synthesized by time writers.
Translations are stored in files located at
src/locales
. These files contain the transcription for time units and linguistic configurations.See Contributing: Translating if you wish to contribute with a new translation for timecount.