Shipping a 17-Language In-App Picker on Android
An in-app language switch can pass testing and still fail in notifications, release builds and right-to-left scripts. These are the decisions that kept ours reliable.

Adding a language picker to an Android app looks like a weekend job: list some languages, save the choice, restart the activity. The failures arrive later and quietly. A notification appears in the wrong language. Arabic users see a count on the wrong side of its label. A release build shows English everywhere while the debug build was fine, with no crash and nothing in the logs.
We hit these problems while building Googly Player, our media app for videos, music and photos, which ships 17 languages with a picker that is independent of the system language. This article covers the specific decisions that made it work: how the locale is applied, what we changed in the App Bundle configuration, how the picker is laid out, and how we handle right-to-left scripts, counts and plurals.
It is aimed at Android engineers who need an in-app language switch that holds up across services, dialogs and release builds, not only the screen they tested.
An in-app picker, independent of the system language
Googly Player has a full language picker inside the app. The choice does not depend on the device language, so someone whose phone is set to English can run the app in Hindi, or the reverse, without touching system settings.
The 17 languages are English, Hindi, Spanish, Arabic, French, Bengali, Portuguese, Russian, Urdu, Indonesian, German, Japanese, Turkish, Vietnamese, Korean, Italian and Gujarati. Two of them, Arabic and Urdu, are right-to-left, which affects layout and string handling in ways covered below. The rest of the work is making sure the selected language applies everywhere the app shows text, and that every translation is actually present on the device.
Applying the locale process-wide
We apply the language through AppCompatDelegate.setApplicationLocales. Because it is applied to the whole process, the choice covers services, notifications and dialogs as well as activities. That matters for a media player: the playback notification is rendered outside any activity, and a per-activity locale override would leave it in the old language.
On Android 13 and later the choice is handed to the platform. The result is that the language also appears under Settings › Apps › Googly Player › Language, so the in-app picker and the system per-app setting stay in agreement instead of competing.
The App Bundle setting that makes the picker lie
The least obvious part of the feature is not in code. We deliberately disable language splits in the App Bundle, so every translation ships in the base APK.
With splits enabled, Play delivers only the resources for the system language. The picker would then offer 17 languages, accept the selection, and render everything in English because the other resources were never installed. There is no crash and nothing in the logs, so it passes casual testing on a device whose system language matches the developer's. Disabling splits costs some install size and removes that whole failure class. If you offer a picker that is independent of the system language, your bundle configuration has to allow it.
A picker that people can actually use
Every language is listed by its endonym, its own name in its own script, as the primary label, with the English name underneath. Someone who has landed in a language they cannot read can still find the one they can: हिन्दी, العربية, 日本語, ગુજરાતી.
- Searchable: the list can be filtered by typing.
- Suggested section: based on the device locale, so the most likely choice sits at the top.
- Two labels per row: endonym first, English name beneath it.
The endonym-first layout is a small decision, but it is the one that lets the picker work for someone who cannot read the current interface language.
Right-to-left for Arabic and Urdu
Arabic and Urdu get full RTL support. That includes the picker itself: the language names are correctly anchored in the list rather than left-aligned out of habit, so the Arabic and Urdu entries read naturally next to the Latin, Devanagari and CJK ones.
RTL is also where string construction bites hardest, which is the subject of the next two sections. Mirroring the layout is the visible half of RTL support; the other half is not building user-facing strings in ways that assume left-to-right order.
Format counts, never concatenate them
We write counts as formatted resources, such as Total Videos: %d, and never as "Total Videos: " + n. When a label and a number are glued together in code, the number ends up on the wrong side of the label in Arabic and Urdu. A format string lets each translation place the number where its language wants it.
This applies anywhere the app shows a number beside text. In Googly Player that includes the library counts and the Global Search section headers, which show a label and a count such as Videos · 12, Music · 4 and Photos · 87. Keeping those as format resources means the translator controls the order.
Plurals need plural resources
Plural handling is the second place a format string is not enough. We use proper Android plural resources, because languages differ in how many grammatical forms a number requires: Arabic needs six, Russian needs four. An English-style singular/plural pair cannot express that, and a single %d format cannot choose between forms at all.
The practical rule is to treat every user-visible quantity as a plural resource from the start. Retrofitting it after translation is harder than writing it correctly, because the translators for Arabic and Russian then have to supply forms your English source never anticipated.
What you need to reproduce this
The approach relies on the following:
- AppCompat: language is applied with
AppCompatDelegate.setApplicationLocales. - Android 13+ for the system entry: on these versions the choice is handed to the platform and appears under Settings › Apps › Googly Player › Language.
- App Bundle configuration: language splits disabled so every translation ships in the base APK.
- String resources: format strings for counts and plural resources for quantities, with RTL-aware layouts for Arabic and Urdu.
To check your own build, install the release bundle on a device whose system language differs from your selection, switch language in the picker, and confirm that the playback notification and a dialog change as well as the main screen. If any of them stays in the system language, the locale is not being applied process-wide or the resources are not on the device.
- #Android localization
- #Android plurals
- #Googly Player
- #RTL Android
- #in-app language picker
- #setApplicationLocales


Comments