i18n_extension library

Classes

ITranslations
TranslatedString
Translations
TranslationsByLocale
TranslationsException

Extensions

Localization

Functions

localize(String key, ITranslations translations, {String locale}) → String
To localize a translatable string, pass its key and the translations object. [...]
localizeAllVersions(String key, ITranslations translations, {String locale}) → Map<String, String>
Returns a map of all translated strings, where modifiers are the keys. In special, the unversioned text is returned indexed with a null key.
localizeFill(String text, List<Object> params) → String
localizePlural(int modifier, String key, ITranslations translations, {String locale}) → String
Returns the translated version for the plural modifier. After getting the version, substring %d will be replaced with the modifier.
localizeVersion(Object modifier, String key, ITranslations translations, {String locale}) → String
Return the localized string, according to key and modifier. [...]
recordKey(String key) → String
This simply records the given key as a missing translation with unknown locale.