class I18nContext
An object that provides internationalization functionality for the current locale.
class I18nContext
extends ObservableObject
implements DeferredString.I18nProvider;
Notes
- This object is used by fmt() and Binding.fmt() to translate and format strings.
- An instance of this class is available on the global application context, as app.i18n.
Instance members
locale
The current locale, if any.configure()
Configures the i18n context.setText()
Sets the translations for the current locale.clear()
Clears the current locale, methods, and translations.getText()
Translates the provided text to the current locale, if necessary.getPlural()
Chooses a plural form based on a specific quantity.format()
Formats a value according to the specified type.getCulture()
Returns current (user) culture preferences and/or locale defaults, as reported by the configured i18n provider.
Related
class DeferredString
An object that encapsulates a string, evaluated only when needed.
