Skip to main content

app_locale

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

Read or set the language one app runs in. Per app, not for the device: it is reversible, immediate, and it is the question actually being asked. Call with just an app to read; pass a language tag such as "ja-JP" to pin it, or an empty string to follow the device again. Android 13+. What is confirmed is that the device stored the tag — whether the app has a translation for it is not something Android reports, so check the screen. Changing it invalidates the refs from the previous screen, and the app has to be relaunched to re-render.

Changes the device, the app or the session: readOnlyHint is false.

Arguments​

NameTypeRequiredWhat it is
appstringyesPackage name, e.g. "com.example.shop".
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
driverstring: uiautomator2, uiautomator, wdaDriver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones).
localestringA BCP-47 tag such as "ja-JP", or several separated by commas in order of preference. Empty string clears the pin. Omit to read.

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

Run one app in Japanese​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_locale",
"arguments": {
"app": "org.wikipedia",
"locale": "ja-JP"
}
}
}

On an Android 15 emulator the answer's text was:

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