Class LanguageUtils

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

public class LanguageUtils extends 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 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.