Added in API level 33

LocaleManager


public class LocaleManager
extends Object

java.lang.Object
   ↳ android.app.LocaleManager


This class gives access to system locale services. These services allow applications to control granular locale settings (such as per-app locales) or override their list of supported locales while running.

Third party applications should treat this as a write-side surface, and continue reading locales via their in-process LocaleLists.

Summary

Public methods

LocaleList getApplicationLocales()

Returns the UI locales for the calling app.

LocaleList getApplicationLocales(String appPackageName)

Returns the current UI locales for a specified app (described by package name).

LocaleConfig getOverrideLocaleConfig()

Returns the override LocaleConfig for the calling app.

LocaleList getSystemLocales()

Returns the current system locales, ignoring app-specific overrides.

void setApplicationLocales(LocaleList locales)

Sets the UI locales for the calling app.

void setOverrideLocaleConfig(LocaleConfig localeConfig)

Sets the override LocaleConfig for the calling app.

Inherited methods