Share via


AssetManager.GetLocales Method

Definition

Get the locales that this asset manager contains data for.

[Android.Runtime.Register("getLocales", "()[Ljava/lang/String;", "")]
public string[]? GetLocales ();
[<Android.Runtime.Register("getLocales", "()[Ljava/lang/String;", "")>]
member this.GetLocales : unit -> string[]

Returns

String[]
Attributes

Remarks

Get the locales that this asset manager contains data for.

On SDK 21 (Android 5.0: Lollipop) and above, Locale strings are valid BCP-47 language tags and can be parsed using Locale#forLanguageTag(String).

On SDK 20 (Android 4.4W: Kitkat for watches) and below, locale strings are of the form ll_CC where ll is a two letter language code, and CC is a two letter country code.

Java documentation for android.content.res.AssetManager.getLocales().

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