public class LocalizationHelper
extends java.lang.Object
setLocale(Locale)
or
setLanguage(String)
and then wrap context by overriding
ContextThemeWrapper.attachBaseContext(android.content.Context)
and wrapping context using wrap(Context)
method:
{@code
Modifier and Type | Method and Description |
---|---|
static void |
setLanguage(java.lang.String lang) |
static void |
setLocale(java.util.Locale locale)
Sets default locale and locale for conext wrapping, see
wrap(Context) . |
static android.content.Context |
wrap(android.content.Context origContext)
Wrapping provided context with new localized context, using locale set in
setLocale(Locale) or setLanguage(String) .New context should be provided in ContextThemeWrapper.attachBaseContext(android.content.Context) .
See LocalizationHelper for more details. |
public static void setLanguage(java.lang.String lang)
public static void setLocale(java.util.Locale locale)
wrap(Context)
.public static android.content.Context wrap(android.content.Context origContext)
setLocale(Locale)
or setLanguage(String)
.ContextThemeWrapper.attachBaseContext(android.content.Context)
.
See LocalizationHelper
for more details.