ULocale.ToLegacyType(String, 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 value (BCP 47 Unicode locale extension type, or legacy type or type alias) to the canonical legacy type.
[Android.Runtime.Register("toLegacyType", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? ToLegacyType (string? keyword, string? value);
[<Android.Runtime.Register("toLegacyType", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member ToLegacyType : string * string -> string
Parameters
- keyword
- String
the locale keyword (either legacy keyword such as "collation" or BCP 47 Unicode locale extension key such as "co").
- value
- String
the locale keyword value (either BCP 47 Unicode locale extension type such as "phonebk" or legacy keyword value such as "phonebook").
Returns
the well-formed legacy type, or null if the specified keyword value cannot be mapped to a well-formed legacy type.
- Attributes
Remarks
<strong>[icu]</strong> Converts the specified keyword value (BCP 47 Unicode locale extension type, or legacy type or type alias) to the canonical legacy type. For example, the legacy type "phonebook" is returned for the input BCP 47 Unicode locale extension type "phonebk" with the keyword "collation" (or "co").
When the specified keyword is not recognized, but the specified value satisfies the syntax of legacy key, or when the specified keyword allows 'variable' type and the specified value satisfies the syntax, the lower-case version of the input value will be returned. For example, toLegacyType("Foo", "Bar")
returns "bar", toLegacyType("vt", "00A4")
returns "00a4".
Java documentation for android.icu.util.ULocale.toLegacyType(java.lang.String, 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.