How we built 17-language support into Googly Player, and the traps it avoids

Translating the strings is the easy part. Here is the picker, the locale plumbing, the right-to-left handling and the one build setting that decide whether 17 languages actually work.

Binary Buddies · 5 min read · 1 view
An evening street strung with lanternsA dusk sky over layered rooftops with lit windows, a string of coloured lanterns swaying across the street, and headphones resting on a bench beside a small speaker.

Translating the strings of an Android app is the part everyone budgets for. The failures arrive afterwards. A language picker changes the screens but leaves the notification and the dialogs in English. An Arabic label strands its number on the wrong side. A Russian count reads like a grammatical mistake. And a release build quietly shows English whatever the user chooses, with no crash and nothing in the logs to explain it.

There is also a plainer problem: people whose phone is set to one language and who want a particular app in another. If the only switch is the system language, they either change their whole phone or put up with an app they read less comfortably.

Googly Player, our media app for videos, music and photos, has a full in-app picker for 17 languages that works independently of the system language. This is how we built it, and which specific trap each part is there to avoid.

Key takeaways

  • The language you choose in Googly Player is independent of the phone's system language, and it reaches services, notifications and dialogs as well as screens.
  • We disable language splits in the App Bundle. With them on, Play delivers only the system-language resources and the picker silently falls back to English.
  • Arabic and Urdu get full right-to-left support, and every count is a format string, so numbers sit where each language expects them.
  • Plurals use proper plural resources, because Arabic needs six grammatical forms for a number and Russian needs four.
  • On Android 13 and later the choice is handed to the platform and also appears in the system's per-app language setting.

Seventeen languages, chosen inside the app

Googly Player ships in 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) and Gujarati (ગુજરાતી).

The set covers several scripts, and two of the languages, Arabic and Urdu, read right to left. That is what makes the work more than a strings exercise. A picker that only swaps text works well enough for German or Italian. It falls apart the moment a layout has to mirror, or a number has to agree grammatically with the word next to it. Every decision below follows from having both kinds of language in the same list.

Googly Player's 17 languages by reading directionFifteen languages read left to right and two, Arabic and Urdu, read right to left.Left to right · 15EnglishHindiSpanishFrenchBengaliPortugueseRussianIndonesianGermanJapaneseTurkishVietnameseKoreanItalianGujaratiRight to left · 2ArabicUrdu
Two of the seventeen languages run right to left, and they drive most of the engineering decisions that follow.

A picker you can read before you have picked

Each language in the picker is listed by its endonym, its own name in its own script, as the main label, with the English name underneath. Someone looking for Bengali spots বাংলা faster than a word in a language they may not read well. Someone browsing in English still has the English name to go on.

The list is searchable, and it opens with a Suggested section built from the device locale, so the likely choices sit at the top without the app forcing them on anyone. The suggestion is a starting point, not a decision. You can pick any of the 17, whatever your phone is set to.

An apartment block at nightA long row of lit apartment windows under a night sky, each glowing a different colour, with a lamp and a plant gently swaying inside.

Right-to-left for Arabic and Urdu

Arabic and Urdu get full right-to-left support, not translated text dropped into a left-to-right layout. The detail that shows whether this was done carefully is in the picker itself. A list that mixes العربية and اردو with Deutsch and Español has to anchor each name correctly, or the right-to-left entries end up ragged against the wrong edge. We anchor the language names correctly in the picker, so the list reads properly in both directions.

Right-to-left support also changes how strings have to be written. A layout can mirror perfectly and still produce sentences that read wrongly, because the code that assembles them assumed left-to-right order. That is the next trap.

Counts are formatted, never glued together

A media library shows counts everywhere: how many videos, how many tracks, how many photos. The quick way to build such a label is to concatenate a translated string and a number, as in “Total Videos: ” + n. In English that looks fine. In Arabic and Urdu, concatenation puts the number on the wrong side of the label.

So every count in Googly Player is a format string, such as “Total Videos: %d”. The translator decides where the placeholder goes, and the number lands where the language expects it. This is a discipline across the codebase rather than a feature you can see. If a single label is built by concatenation, that one label is wrong in two of our seventeen languages.

Concatenation versus a format stringJoining a label and a count puts the number on the wrong side in right-to-left languages; a format string lets the translation place the number.Concatenationlabel + countNumber wrong side in RTLFormat stringTotal Videos: %dTranslation places the number
The same count, built two ways: only the format string survives a right-to-left translation.

Plurals that a format string cannot express

A format string fixes where the number goes. It does not fix the word next to it. English gets by with a singular and a plural, which is why so many apps get away with a simple conditional. Arabic needs six grammatical forms for a number, and Russian needs four. No single format string can hold that.

Googly Player uses proper Android plural resources for every counted noun, so each language supplies as many forms as its grammar needs and the platform picks the right one for the number on screen. For a user that is the difference between a count that reads naturally and one that reads like a machine wrote it.

17languages in the in-app picker
6plural forms Arabic needs
4plural forms Russian needs
2right-to-left languages

One setting that reaches the whole process

Many in-app language switchers change the activity you are looking at and nothing else. In a media app that is not enough. Playback runs in a background service, controls live in a media notification, and confirmations appear in dialogs. A half-applied language leaves the user switching between two languages without having asked to.

We apply the chosen language process-wide through AppCompatDelegate.setApplicationLocales, so it covers services, notifications and dialogs as well as activities. On Android 13 and later, the choice is handed to the platform, which means it also appears under Settings › Apps › Googly Player › Language. Users who manage app languages from system settings find Googly Player's choice there, in step with the one inside the app.

How a language choice reaches the whole appThe in-app picker calls setApplicationLocales, which applies the language to activities, services, notifications and dialogs, and on Android 13 and later to the system settings entry.Language pickersetApplicationLocalesActivitiesServicesNotificationsDialogsAndroid 13+System Settings language entry
One call carries the choice to every part of the app, and on Android 13 and later out to the system's own settings.

The App Bundle setting that fails without a sound

This is the trap that never shows up in development. Android App Bundles split resources by language by default, so Google Play delivers only the resources for the device's system language. An in-app picker then has nothing to switch to. Choose Japanese on a phone set to English, and the app keeps rendering English. It does not crash, and nothing appears in the logs. Testing on a debug build that carries every resource will not reveal it either.

We disable language splits in Googly Player's App Bundle on purpose, so every translation ships in the base APK. Whatever language a phone is set to, all 17 are on the device when the user opens the picker.

Language splits on versus disabledWith language splits on, only system-language resources arrive and the picker renders English; with splits disabled, all translations ship in the base APK and the picker shows the chosen language.Language splits onApp BundleSystem-language resources onlyPicker renders EnglishNo crash, nothing in logsSplits disabledApp BundleAll translations in base APKPicker shows chosen languageEvery translation ships
The same picker in two builds: whether it works depends entirely on what Play installs.

Questions before you start

Googly Player is an Android app delivered as an App Bundle through Google Play, and the in-app picker works on any phone the app runs on. The integration with the system's per-app language setting needs Android 13 or later. For teams weighing the same approach in their own app, the checklist is short: apply the locale process-wide, keep every translation in the base APK, write every count as a format string, and use plural resources for every counted noun.

Does Googly Player follow my phone's language?

It uses your device locale to fill the Suggested section at the top of the picker, but the language you choose is independent of the system language. You can run the app in any of its 17 languages whatever your phone is set to.

Can I change Googly Player's language from Android Settings?

Yes, on Android 13 and later. The choice is handed to the platform, so it also appears under Settings › Apps › Googly Player › Language.

Will the notification and dialogs switch language too?

Yes. The language is applied across the whole app process, so it covers services, notifications and dialogs, not only the screens.

Which languages read right to left?

Arabic and Urdu. Both have full right-to-left support, including correctly anchored language names in the picker.

Why does an in-app language picker sometimes show only English?

Usually because the App Bundle splits resources by language, so Play installs only the system-language translations. We disable language splits so all 17 translations ship in the base APK.

  • #Android localization
  • #Android plural resources
  • #Googly Player
  • #RTL Arabic Urdu
  • #in-app language picker

Comments

Add a comment
Sign in with Google to join the conversation