ULocale Constructors
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.
Overloads
ULocale(String) |
<strong>[icu]</strong> Constructs a ULocale from a RFC 3066 locale ID. |
ULocale(String, String) |
Convenience overload of ULocale(String, String, String) for compatibility with java. |
ULocale(String, String, String) |
Constructs a ULocale from a localeID constructed from the three 'fields' a, b, and c. |
ULocale(String)
<strong>[icu]</strong> Constructs a ULocale from a RFC 3066 locale ID.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=24)]
public ULocale (string? localeID);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=24)>]
new Android.Icu.Util.ULocale : string -> Android.Icu.Util.ULocale
Parameters
- localeID
- String
string representation of the locale, e.g: "en_US", "sy_Cyrl_YU", "zh__pinyin", "es_ES
- Attributes
Remarks
<strong>[icu]</strong> Constructs a ULocale from a RFC 3066 locale ID. The locale ID consists of optional language, script, country, and variant fields in that order, separated by underscores, followed by an optional keyword list. The script, if present, is four characters long-- this distinguishes it from a country code, which is two characters long. Other fields are distinguished by position as indicated by the underscores. The start of the keyword list is indicated by '
Java documentation for android.icu.util.ULocale.ULocale(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
ULocale(String, String)
Convenience overload of ULocale(String, String, String) for compatibility with java.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=24)]
public ULocale (string? a, string? b);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=24)>]
new Android.Icu.Util.ULocale : string * string -> Android.Icu.Util.ULocale
Parameters
- a
- String
- b
- String
- Attributes
Remarks
Convenience overload of ULocale(String, String, String) for compatibility with java.util.Locale.
Java documentation for android.icu.util.ULocale.ULocale(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.
Applies to
ULocale(String, String, String)
Constructs a ULocale from a localeID constructed from the three 'fields' a, b, and c.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=24)]
public ULocale (string? a, string? b, string? c);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=24)>]
new Android.Icu.Util.ULocale : string * string * string -> Android.Icu.Util.ULocale
Parameters
- a
- String
first component of the locale id
- b
- String
second component of the locale id
- c
- String
third component of the locale id
- Attributes
Remarks
Constructs a ULocale from a localeID constructed from the three 'fields' a, b, and c. These fields are concatenated using underscores to form a localeID of the form a_b_c, which is then handled like the localeID passed to ULocale(String localeID)
.
Java locale strings consisting of language, country, and variant will be handled by this form, since the country code (being shorter than four letters long) will not be interpreted as a script code. If a script code is present, the final argument ('c') will be interpreted as the country code. It is recommended that this constructor only be used to ease porting, and that clients instead use the single-argument constructor when constructing a ULocale from a localeID.
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.