android-components / mozilla.components.support.locale / LocaleManager

LocaleManager

object LocaleManager (source)

Helper for apps that want to change locale defined by the system.

Functions

Name Summary
getCurrentLocale fun getCurrentLocale(context: <ERROR CLASS>): Locale?
The latest stored locale saved by setNewLocale.
setNewLocale fun setNewLocale(context: <ERROR CLASS>, language: String): <ERROR CLASS>
Change the system defined locale to the indicated in the language parameter. This new language will be stored and will be the new current locale returned by getCurrentLocale.