次の方法で共有


Locale.Lookup Method

Definition

Returns a Locale instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.

[Android.Runtime.Register("lookup", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/Locale;", "", ApiSince=26)]
public static Java.Util.Locale? Lookup (System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> priorityList, System.Collections.Generic.ICollection<Java.Util.Locale> locales);
[<Android.Runtime.Register("lookup", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/Locale;", "", ApiSince=26)>]
static member Lookup : System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> * System.Collections.Generic.ICollection<Java.Util.Locale> -> Java.Util.Locale

Parameters

priorityList
IList<Locale.LanguageRange>

user's Language Priority List in which each language tag is sorted in descending order based on priority or weight

locales
ICollection<Locale>

Locale instances used for matching

Returns

the best matching Locale instance chosen based on priority or weight, or null if nothing matches.

Attributes

Remarks

Returns a Locale instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.

Added in 1.8.

Java documentation for java.util.Locale.lookup(java.util.List<java.util.Locale.LanguageRange>, java.util.Collection<java.util.Locale>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to