mobi.voiceassistant.base.content
Class Locales

java.lang.Object
  extended by mobi.voiceassistant.base.content.Locales

public final class Locales
extends Object

This class works with BCP 47 locale tags


Field Summary
static Parcelable.Creator<Locale> CREATOR
           
 
Method Summary
static boolean acceptLocale(Locale[] supportedLocales, Locale locale)
           
static boolean acceptLocale(Locale supportedLocale, Locale locale)
           
static boolean acceptLocale(String supportedLocales, Locale locale)
           
static boolean acceptLocale(String supportedLocales, String locale)
           
static Locale parseLocale(String localeStr)
           
static Locale[] parseLocales(String localesStr)
           
static String toBCP47Tag(Locale locale)
           
static void writeToParcel(Parcel parcel, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATOR

public static final Parcelable.Creator<Locale> CREATOR
Method Detail

acceptLocale

public static boolean acceptLocale(String supportedLocales,
                                   String locale)

acceptLocale

public static boolean acceptLocale(String supportedLocales,
                                   Locale locale)

acceptLocale

public static boolean acceptLocale(Locale[] supportedLocales,
                                   Locale locale)

acceptLocale

public static boolean acceptLocale(Locale supportedLocale,
                                   Locale locale)

parseLocales

public static Locale[] parseLocales(String localesStr)

parseLocale

public static Locale parseLocale(String localeStr)

toBCP47Tag

public static String toBCP47Tag(Locale locale)

writeToParcel

public static void writeToParcel(Parcel parcel,
                                 Locale locale)