Locale.LookupTag Method

Definition

Returns the best-matching language tag using the lookup mechanism defined in RFC 4647.

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

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

tags
ICollection<String>

language tangs used for matching

Returns

the best matching language tag chosen based on priority or weight, or null if nothing matches.

Attributes

Remarks

Returns the best-matching language tag using the lookup mechanism defined in RFC 4647.

This lookup operation on the given tags ensures that the first matching tag with preserved case is returned.

Added in 1.8.

Java documentation for java.util.Locale.lookupTag(java.util.List<java.util.Locale.LanguageRange>, java.util.Collection<java.lang.String>).

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