Locale.Of 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.
Overloads
| Name | Description |
|---|---|
| Of(String, String, String) |
Gets a locale for the specified language, region, and variant. |
| Of(String) |
Obtains a locale from a language code. |
| Of(String, String) |
Gets a locale for the specified language and region codes. |
Of(String, String, String)
Gets a locale for the specified language, region, and variant.
[Android.Runtime.Register("of", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)]
public static Java.Util.Locale Of(string language, string country, string variant);
[<Android.Runtime.Register("of", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)>]
static member Of : string * string * string -> Java.Util.Locale
Parameters
- language
- String
A language code. See the Locale class description of language values.
- country
- String
A country code. See the Locale class description of country values.
- variant
- String
Any arbitrary value used to indicate a variation of a Locale. See the Locale class description of variant values.
Returns
A Locale object
- Attributes
Remarks
The language code is converted to lowercase and the region code to uppercase.
Java reference for java.util.Locale.of.
Applies to
Of(String)
Obtains a locale from a language code.
[Android.Runtime.Register("of", "(Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)]
public static Java.Util.Locale Of(string language);
[<Android.Runtime.Register("of", "(Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)>]
static member Of : string -> Java.Util.Locale
Parameters
- language
- String
A language code. See the Locale class description of language values.
Returns
A Locale object
- Attributes
Remarks
Obtains a locale from a language code. This method normalizes the language value to lowercase.
Java reference for java.util.Locale.of.
Applies to
Of(String, String)
Gets a locale for the specified language and region codes.
[Android.Runtime.Register("of", "(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)]
public static Java.Util.Locale Of(string language, string country);
[<Android.Runtime.Register("of", "(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;", "", ApiSince=36)>]
static member Of : string * string -> Java.Util.Locale
Parameters
- language
- String
A language code. See the Locale class description of language values.
- country
- String
A country code. See the Locale class description of country values.
Returns
A Locale object
- Attributes
Remarks
The language code is converted to lowercase and the region code to uppercase.
Java reference for java.util.Locale.of.