public class LanguageUtils
extends java.lang.Object
Constructor and Description |
---|
LanguageUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
setLanguageAndCountry(java.lang.String language,
java.lang.String country,
android.content.Context ctx)
Sets the language and country locale for given language and country.
|
static void |
setLanguageConfiguration(android.content.res.Resources res)
Method that will set correct language configuration to given Resources
object.
|
public static void setLanguageAndCountry(@Nullable java.lang.String language, @Nullable java.lang.String country, @NonNull android.content.Context ctx)
language
- desired languagecountry
- desired country (to select country-specific language locale)ctx
- context for accessing shared preferencespublic static void setLanguageConfiguration(@NonNull android.content.res.Resources res)
res
- Resources object whose language configuration should be
updated.