다음을 통해 공유


Currency.GetKeywordValuesForLocale(String, ULocale, Boolean) Method

Definition

Given a key and a locale, returns an array of values for the key for which data exists.

[Android.Runtime.Register("getKeywordValuesForLocale", "(Ljava/lang/String;Landroid/icu/util/ULocale;Z)[Ljava/lang/String;", "", ApiSince=24)]
public static string[]? GetKeywordValuesForLocale (string? key, Android.Icu.Util.ULocale? locale, bool commonlyUsed);
[<Android.Runtime.Register("getKeywordValuesForLocale", "(Ljava/lang/String;Landroid/icu/util/ULocale;Z)[Ljava/lang/String;", "", ApiSince=24)>]
static member GetKeywordValuesForLocale : string * Android.Icu.Util.ULocale * bool -> string[]

Parameters

key
String

key whose values to look up. the only recognized key is "currency"

locale
ULocale

the locale

commonlyUsed
Boolean

if true, return only values that are currently used in the locale. Otherwise returns all values.

Returns

String[]

an array of values for the given key and the locale. If there is no data, the array will be empty.

Attributes

Remarks

Given a key and a locale, returns an array of values for the key for which data exists. If commonlyUsed is true, these are the values that typically are used with this locale, otherwise these are all values for which data exists. This is a common service API.

The only supported key is "currency", other values return an empty array.

Currency information is based on the region of the locale. If the locale does not indicate a region, ULocale#addLikelySubtags(ULocale) is used to infer a region, except for the 'und' locale.

If commonlyUsed is true, only the currencies known to be in use as of the current date are returned. When there are more than one, these are returned in preference order (typically, this occurs when a country is transitioning to a new currency, and the newer currency is preferred), see Unicode TR#35 Sec. C1. If commonlyUsed is false, all currencies ever used in any locale are returned, in no particular order.

Java documentation for android.icu.util.Currency.getKeywordValuesForLocale(java.lang.String, android.icu.util.ULocale, boolean).

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