public abstract class LocalesFallback extends Object
| 构造器 | 说明 |
|---|---|
LocalesFallback() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
abstract ArrayList<String> |
findValidAndSort(String desireTag,
List<String> localeTags) |
Filters out the IDs of locales that do not match the current language or
writing system, and sorts the remaining locale IDs in prioritized order for
locale matching.
|
static LocalesFallback |
getInstance() |
Creates a
LocalesFallback instance. |
public static LocalesFallback getInstance() throws LocaleFallBackException
LocalesFallback instance.LocalesFallback instance.LocaleFallbackException - Throws this exception is if the creation
fails due to an initialization failure.LocaleFallBackExceptionpublic abstract ArrayList<String> findValidAndSort(String desireTag, List<String> localeTags) throws LocaleFallBackException
desireTag - Indicates the ID of the desired locale, such as
zh-Hant-CN and en-US.localeTags - Indicates a list of IDs of supported locales.LocaleFallBackException - Throws this exception if the locale IDs in
localeTags are invalid.