Share via


Configuration.SetLocale(Locale) Method

Definition

Set the locale list to a list of just one locale.

[Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)V", "")]
public void SetLocale (Java.Util.Locale? loc);
[<Android.Runtime.Register("setLocale", "(Ljava/util/Locale;)V", "")>]
member this.SetLocale : Java.Util.Locale -> unit

Parameters

loc
Locale

The locale. Can be null.

Attributes

Remarks

Set the locale list to a list of just one locale. This will also set the layout direction according to the locale.

Note that after this is run, calling .equals() on the input locale and the #locale attribute would return true if they are not null, but there is no guarantee that they would be the same object.

See also the note about layout direction in #setLocales(LocaleList).

Java documentation for android.content.res.Configuration.setLocale(java.util.Locale).

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