Package com.microblink.blinkid.locale
Class LanguageUtils
java.lang.Object
com.microblink.blinkid.locale.LanguageUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
setLanguageAndCountry
(String language, 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.
-
Constructor Details
-
LanguageUtils
public LanguageUtils()
-
-
Method Details
-
setLanguageAndCountry
public static void setLanguageAndCountry(@Nullable String language, @Nullable String country, @NonNull android.content.Context ctx) Sets the language and country locale for given language and country. If either language or country is null, default is loaded from shared preferences. If there is nothing in shared preferences, device default locale is used.- Parameters:
language
- desired languagecountry
- desired country (to select country-specific language locale)ctx
- context for accessing shared preferences
-
setLanguageConfiguration
public static void setLanguageConfiguration(@NonNull android.content.res.Resources res) Method that will set correct language configuration to given Resources object.- Parameters:
res
- Resources object whose language configuration should be updated.
-