Locale.Lookup Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.