Skip to main content

AppLocale · SetAppLocale

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Read or set the language one app runs in. These call app_locale.

AppLocale​

func (d *Device) AppLocale(ctx context.Context, appID string) ([]string, error)

AppLocale reports the language tags pinned for an app. Empty means it follows the device.

SetAppLocale​

func (d *Device) SetAppLocale(ctx context.Context, appID string, tags ...string) error

SetAppLocale runs one app in a chosen language. Pass no tags to follow the device again. Android 13 and later.

What this confirms is that the device stored the tag, not that the app has a translation for it — Android reports no difference between the two, so check the screen. Relaunch the app for it to re-render.

Examples​

Run one app in Japanese​

if err := dev.SetAppLocale(ctx, "org.wikipedia", "ja-JP"); err != nil {
return err
}

The same call from the command line, mobium locale org.wikipedia ja-JP, printed on an Android 15 emulator:

org.wikipedia set to ja-JP — the device stored it; whether org.wikipedia has that translation is not something Android reports, so check the screen

On a device​

mobium launch org.wikipedia on an Android 15 emulator

mobium launch org.wikipedia on an Android 15 emulator