Android Guides | Samples

Android.Content.Res.AssetManager.GetLocales Method

Get the locales that this asset manager contains data for.

Syntax

[Android.Runtime.Register("getLocales", "()[Ljava/lang/String;", "")]
public String[] GetLocales ()

Remarks

Get the locales that this asset manager contains data for.

On SDK 21 (Android 5.0: Lollipop) and above, Locale strings are valid 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.

[Android Documentation]

Requirements

Namespace: Android.Content.Res
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1