Package com.microblink.blinkid.locale

# Class LanguageUtils

java.lang.Object
com.microblink.blinkid.locale.LanguageUtils

public class LanguageUtils extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LanguageUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static 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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 language
      `country` - 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.