Seventeen languages in Googly Player, and the Android traps we fixed to ship them properly
Why our in-app language picker needed an App Bundle change, a process-wide locale call and proper plural resources before it could be trusted in Arabic, Urdu and fifteen other languages.
Adding a language picker to an Android app looks like an afternoon's work: a list, a tap, a refresh. The trouble is that most of the ways it goes wrong produce no error at all. The picker shows Hindi or Arabic as selected and the app carries on rendering English. Nothing crashes and nothing appears in the logs, so nobody finds out until a user does.
The other failures are quieter still. A language applied only to the visible screens leaves the media notification and the dialogs in the old language. A count glued onto a label with string concatenation reads correctly in English and lands on the wrong side of the label in Arabic and Urdu. A single format string for a number cannot express the six plural forms Arabic needs, or the four that Russian needs.
We ran into every one of these building the language support in Googly Player, our app for videos, music and photos, which ships in seventeen languages. Here is how each one is handled, and what to check if you are shipping a picker of your own.
Key takeaways
- The language picker is independent of the system language and is applied to the whole app process, so services, notifications and dialogs follow it, not just the screens.
- With language splits on in an App Bundle, Play delivers only the system language's resources and the picker silently renders English. We disable the splits so every translation ships in the base APK.
- Counts are formatted, never concatenated, because concatenation puts the number on the wrong side of the label in Arabic and Urdu.
- Plurals go through plural resources: Arabic needs six forms for a number, Russian four.
- On Android 13 and later the choice is handed to the platform and shows up in the system's per-app language setting.
Seventeen languages, chosen inside the app
Googly Player has a full in-app language picker that is entirely independent of the system language. A phone can stay in English while the player runs in Bengali, or the other way round, and nobody has to change a device-wide setting to get there. The seventeen languages are:
- English
- Hindi (हिन्दी)
- Spanish (Español)
- Arabic (العربية)
- French (Français)
- Bengali (বাংলা)
- Portuguese (Português)
- Russian (Русский)
- Urdu (اردو)
- Indonesian (Bahasa Indonesia)
- German (Deutsch)
- Japanese (日本語)
- Turkish (Türkçe)
- Vietnamese (Tiếng Việt)
- Korean (한국어)
- Italian (Italiano)
- Gujarati (ગુજરાતી)
Two of them, Arabic and Urdu, are written right to left, and the app has full RTL support for both. That pair, together with the plural rules of Arabic and Russian, drives most of the engineering below. A picker that only ever meets left-to-right languages with English-style plurals hides most of its bugs; these languages are where they surface.
Every language listed in its own script
Each entry in the picker leads with the language's endonym, its own name in its own script, as the primary label, with the English name underneath. Someone who reads Bengali is looking for বাংলা, not for a word in a language they may not read well. Someone helping them set the app up can still find Bengali on the line below. The same holds for हिन्दी, العربية, 日本語 and the rest of the list.
The list is searchable, and it opens with a Suggested section built from the device locale, so the most likely choice is at the top rather than somewhere among seventeen rows. For Arabic and Urdu the language names are correctly anchored in the picker: a right-to-left name sits where a right-to-left reader expects it, rather than being pushed to the left edge like an English label.
One setting for the whole process, not only the screens
The chosen language is applied through AppCompatDelegate.setApplicationLocales, which sets it for the whole app process. That matters for a media app in particular. Googly Player plays in the background through a foreground media-playback service and posts a media notification, and neither of those is an activity. A language switch that only reaches activities leaves the notification and the dialogs speaking the old language while the player itself has moved on.
Applied process-wide, the choice covers services, notifications and dialogs as well as every screen. On Android 13 and later we go a step further and hand the choice to the platform, so it also appears under Settings › Apps › Googly Player › Language. A user who changes the language there rather than inside the app gets the same result, and the system and the app agree on which language is in use.
The App Bundle setting that silently undoes the picker
App Bundles let Play split resources by language and deliver only what a device appears to need. For most apps that is a sensible saving. For an app with its own language picker it is a trap: Play would deliver only the resources for the system language, so choosing Arabic on a phone set to English would find no Arabic strings on the device. The picker would then silently render everything in English, with no crash and nothing in the logs to point at the cause.
We deliberately disable language splits in Googly Player's App Bundle, so every translation ships in the base APK. Once the app is installed, all seventeen languages are already on the device, and switching between them never depends on what Play decided to deliver at install time. It is a one-line configuration choice, and it is the difference between a picker that works and one that only appears to.
Numbers that land on the right side of the label
Every count in Googly Player is formatted, never concatenated. The string is "Total Videos: %d", with the number as a placeholder inside the translation, not "Total Videos: " + n, with the number glued onto the end in code.
In English the two look identical, which is why the concatenated version survives so long in so many apps. In Arabic and Urdu, which read right to left, concatenation puts the number on the wrong side of the label, because the code fixes the order instead of the translation. With a format string, where the number sits is part of each translated string, so it lands where that language puts it.
Counts show up throughout the app, from library totals to search results grouped by type, such as Videos, Music and Photos, each with its own count. Treating every one of them as a format string, rather than fixing the obvious ones, is what keeps an Arabic or Urdu screen from looking half-translated.
Plurals with as many forms as the language needs
A format string solves where the number goes. It does not solve what the words around it should be. Arabic needs six grammatical forms for a number and Russian needs four: the noun that follows changes with the count itself. Any approach that chooses between a singular and a plural in code, or that keeps one format string per count, is wrong for both languages, and the mistakes show up on exactly the screens people look at most, the ones that tell them how much is in their library.
Googly Player uses proper Android plural resources for every count that needs them. Each translation supplies every form its language requires, and the platform picks the right one for the number on screen. Combined with formatted counts, this is what lets a library total read like a sentence written in Russian or Arabic rather than an English template with the words swapped out.
What it runs on, and where to get it
Googly Player is an Android app with Material Design 3 throughout. The in-app picker and the process-wide language work the same way on every version the app runs on; what changes with the Android version is how far the choice reaches into the system.
Android 13 and later
The app and the system share the setting.
- In-app picker with all seventeen languages
- Choice handed to the platform
- Also shown under Settings › Apps › Googly Player › Language
Earlier Android versions
The app manages the setting itself.
- In-app picker with all seventeen languages
- Applied process-wide through setApplicationLocales
- Set and changed from inside the app
Nothing extra has to be downloaded to switch languages. Because language splits are disabled, every translation arrives in the base APK that Play delivers, so the full set is on the phone from the first launch. Choosing Arabic or Urdu turns on the app's right-to-left support, and none of it requires changing the phone's own language. Googly Player is distributed through Google Play.
Questions
Do I have to change my phone's language to use Googly Player in another language?
No. The in-app picker is entirely independent of the system language, so the phone can stay in one language while the player runs in any of the seventeen it supports.
Why does the picker show names like 日本語 instead of Japanese?
Each language is listed by its own name in its own script, because that is what a speaker of the language looks for. The English name is shown underneath, and the list is searchable with a Suggested section based on the device locale.
Will the playback notification switch language as well?
Yes. The language is applied to the whole app process through AppCompatDelegate.setApplicationLocales, which covers services, notifications and dialogs as well as the app's screens.
Does switching language download anything?
No. Language splits are disabled in the App Bundle, so every translation ships in the base APK and is already on the device once the app is installed.
Which languages read right to left?
Arabic and Urdu. Both have full RTL support, including correctly anchored language names in the picker and counts that are formatted rather than concatenated, so numbers land on the correct side of their labels.
- #Android localization
- #Android plural resources
- #Arabic and Urdu
- #Googly Player
- #RTL support
- #in-app language picker


Comments