ULocale.ToUnicodeLocaleKey(String) 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.
<strong>[icu]</strong> Converts the specified keyword (legacy key, or BCP 47 Unicode locale extension key) to the equivalent BCP 47 Unicode locale extension key.
[Android.Runtime.Register("toUnicodeLocaleKey", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? ToUnicodeLocaleKey (string? keyword);
[<Android.Runtime.Register("toUnicodeLocaleKey", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member ToUnicodeLocaleKey : string -> string
Parameters
- keyword
- String
the input locale keyword (either legacy key such as "collation" or BCP 47 Unicode locale extension key such as "co").
Returns
the well-formed BCP 47 Unicode locale extension key, or null if the specified locale keyword cannot be mapped to a well-formed BCP 47 Unicode locale extension key.
- Attributes
Remarks
<strong>[icu]</strong> Converts the specified keyword (legacy key, or BCP 47 Unicode locale extension key) to the equivalent BCP 47 Unicode locale extension key. For example, BCP 47 Unicode locale extension key "co" is returned for the input keyword "collation".
When the specified keyword is unknown, but satisfies the BCP syntax, then the lower-case version of the input keyword will be returned. For example, toUnicodeLocaleKey("ZZ")
returns "zz".
Java documentation for android.icu.util.ULocale.toUnicodeLocaleKey(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.