Building an In-App Language Picker on Android Properly
The App Bundle default, string concatenation and one-size plural strings each break an in-app language picker quietly. Here is how we handled them across 17 languages.

Most Android apps that offer a language picker fail in one of two ways. The picker changes the activity text but leaves notifications and dialogs in the system language. Or it works on the developer's debug build and falls back to English on a user's phone, with no crash and no log line to explain why. Both are easy to ship and hard to notice, because the person testing usually has the same system language as the person who wrote the code.
Layout and grammar cause the other failures. A label built by gluing a number to a string puts the number on the wrong side in right-to-left languages. A plural built from a single format string cannot express the number of grammatical forms some languages need. None of these show up in an English test pass.
Googly Player, our video, music and photo app for Android, ships a full in-app picker for 17 languages that is independent of the system language. This article covers how we built it, including the specific traps, so you can check your own app against the same list.
A picker that ignores the system language
The picker lets a user run the app in a language different from the one the phone is set to. The 17 languages are English, Hindi, Spanish, Arabic, French, Bengali, Portuguese, Russian, Urdu, Indonesian, German, Japanese, Turkish, Vietnamese, Korean, Italian and Gujarati.
That independence is the reason the rest of this article matters. If the app simply followed the system locale, none of the problems below would exist, because the platform would do the work. Overriding the language means we own every place where text is produced, and the sections below walk through those places one by one.
Endonyms first, search, and a suggested section
Each language is listed by its endonym, its own name in its own script, as the primary label, with the English name underneath. Someone who reads only Gujarati should be able to find ગુજરાતી without recognising the word 'Gujarati'. The same goes for हिन्दी, العربية, 한국어 and the rest.
The list is searchable, and it has a 'Suggested' section at the top based on the device locale. A user whose phone is set to Turkish sees Türkçe offered first, but nothing is applied until they choose it. Searching works against the list as displayed, so a user can type in either script or in English.
Applying the locale to the whole process
We apply the choice with AppCompatDelegate.setApplicationLocales. The call is process-wide, which means it covers services, notifications and dialogs, not just activities. That matters for a media player in particular. The playback notification is posted from a service, and a picker that only touched activities would leave the notification in the wrong language while the app itself looked correct.
On Android 13 and later the choice is handed to the platform. The language then also appears under Settings › Apps › Googly Player › Language, so a user can change it from system settings and the app follows, or change it in the app and see it reflected there. We do not keep a second copy of the preference that could drift out of sync on those versions.
The App Bundle setting that silently breaks everything
This is the failure that is easiest to miss. By default, an App Bundle splits resources by language, and Play delivers only the system-language resources to each device. If the user's system language is English and they pick Japanese in your picker, the Japanese strings are not on the device. The app renders everything in English. There is no crash and nothing in the logs.
We deliberately disabled language splits in the App Bundle so every translation ships in the base APK. The cost is a somewhat larger install, and it is the price of a picker that is independent of the system language. If your app offers an in-app picker and you build an App Bundle, check this setting before you check anything else. Testing on a device whose system language already matches the one you are testing will hide the bug.
Right-to-left for Arabic and Urdu
Arabic and Urdu get full RTL support. That includes the picker itself: the language names in the list are correctly anchored, so an Arabic or Urdu entry sits on the proper edge instead of being laid out as if the list were left-to-right.
The picker is a good place to test this because it mixes scripts in one list. Latin, Devanagari, Arabic, Cyrillic, Hangul and Japanese labels sit next to each other, and each row has to anchor correctly regardless of the direction of the language currently active in the app.
Counts are formatted, never concatenated
Every count in the app goes through a format string with a placeholder, as in 'Total Videos: %d', and never through concatenation, as in 'Total Videos: ' + n. Concatenation hard-codes the order of label and number. In Arabic and Urdu the number ends up on the wrong side of the label.
With a format string, the translator controls where the number goes. English can keep the label first, and Arabic and Urdu translations can place the number where the language needs it. The rule is simple to enforce in review: any string built by joining a literal and a variable is a bug.
Plurals need plural resources
For anything that depends on quantity, we use proper plural resources rather than a format string with an 'if one, else many' branch. The reason is grammatical. Arabic needs six forms for a number, and Russian needs four. A single format string cannot express that, and neither can a two-way conditional written for English.
- Arabic: six grammatical forms
- Russian: four grammatical forms
- Mechanism: plural resources, so each translation supplies the forms its language needs
The code stays the same across languages, and each translation file decides which forms exist.
What to check in your own app
The same checklist applies to any Android app with an in-app language picker. It runs from setup through to the failure modes that only appear on real devices.
- Apply the locale with
AppCompatDelegate.setApplicationLocalesso services, notifications and dialogs follow, not just activities. - On Android 13+, let the platform hold the preference so it shows under the app's language setting in system Settings.
- Disable language splits in the App Bundle so every translation is in the base APK.
- Test with a system language different from the one you are selecting. Otherwise the missing-resources bug stays invisible.
- Use format strings for every count and plural resources for every quantity-dependent string.
- Check Arabic and Urdu in the picker and in the app, not just in the screens you wrote last.
Googly Player's picker covers all of this across 17 languages. It is available inside the app's settings and is independent of the language the phone is set to.
- #Android localization
- #Android plurals
- #Googly Player
- #RTL Android
- #in-app language picker


Comments