Compartir a través de


ULocale.SetKeywordValue Method

Definition

Overloads

SetKeywordValue(String, String, String)

Given a locale id, a keyword, and a value, return a new locale id with an updated keyword and value.

SetKeywordValue(String, String)

<strong>[icu]</strong> Given a keyword and a value, return a new locale with an updated keyword and value.

SetKeywordValue(String, String, String)

Given a locale id, a keyword, and a value, return a new locale id with an updated keyword and value.

[Android.Runtime.Register("setKeywordValue", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? SetKeywordValue (string? localeID, string? keyword, string? value);
[<Android.Runtime.Register("setKeywordValue", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member SetKeywordValue : string * string * string -> string

Parameters

localeID
String

the locale id to modify

keyword
String

the keyword to add/remove, or null to remove all keywords.

value
String

the value to add/set, or null to remove this particular keyword.

Returns

the updated locale id

Attributes

Remarks

Given a locale id, a keyword, and a value, return a new locale id with an updated keyword and value. If the keyword is null, this removes all keywords from the locale id. Otherwise, if the value is null, this removes the value for this keyword from the locale id. Otherwise, this adds/replaces the value for this keyword in the locale id. The keyword and value must not be empty.

Related: #getBaseName(String) returns the locale ID string with all keywords removed.

Java documentation for android.icu.util.ULocale.setKeywordValue(java.lang.String, 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

SetKeywordValue(String, String)

<strong>[icu]</strong> Given a keyword and a value, return a new locale with an updated keyword and value.

[Android.Runtime.Register("setKeywordValue", "(Ljava/lang/String;Ljava/lang/String;)Landroid/icu/util/ULocale;", "", ApiSince=24)]
public Android.Icu.Util.ULocale? SetKeywordValue (string? keyword, string? value);
[<Android.Runtime.Register("setKeywordValue", "(Ljava/lang/String;Ljava/lang/String;)Landroid/icu/util/ULocale;", "", ApiSince=24)>]
member this.SetKeywordValue : string * string -> Android.Icu.Util.ULocale

Parameters

keyword
String

the keyword to add/remove, or null to remove all keywords.

value
String

the value to add/set, or null to remove this particular keyword.

Returns

the updated locale

Attributes

Remarks

<strong>[icu]</strong> Given a keyword and a value, return a new locale with an updated keyword and value. If the keyword is null, this removes all keywords from the locale id. Otherwise, if the value is null, this removes the value for this keyword from the locale id. Otherwise, this adds/replaces the value for this keyword in the locale id. The keyword and value must not be empty.

Related: #getBaseName() returns the locale ID string with all keywords removed.

Java documentation for android.icu.util.ULocale.setKeywordValue(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