How Googly Player Gets 17 Languages Right on Android, From Picker to Plurals

The quiet ways an in-app language picker fails on Android, and the specific choices that keep Googly Player correct in all 17 of its languages, including Arabic, Urdu and Russian.

Binary Buddies · 5 min read · 0 views
An evening balcony above a cityA phone playing a video on a balcony table at dusk, with lit apartment windows behind and a string of coloured pennants crossing the sky.

Adding a language picker to an Android app looks like an afternoon's work: a list, a tap, a locale change. The failures arrive later, and most of them are quiet. A user picks Arabic and the screen stays in English. A counter shows its number on the wrong side of its label. The notification from a background service keeps speaking the system language while the activity in front of it has switched.

None of this crashes. Nothing appears in the logs. The person who chose a language other than their phone's concludes that the app does not really support it, and that is the end of the relationship.

Googly Player, our Android app for the videos, music and photos on your device, ships 17 languages behind its own picker, entirely independent of the system language. This is an account of what doing that properly involved: how the picker labels languages, the API that applies the choice everywhere, a build setting that would otherwise break it without a trace, and the string rules that keep Arabic, Urdu and Russian correct.

Key takeaways

  • The chosen language is applied process-wide through AppCompatDelegate.setApplicationLocales, so services, notifications and dialogs follow it, not only activities.
  • Language splits are disabled in the App Bundle; with them on, Play would deliver only the system language and the picker would silently show English.
  • Counts go through format strings and plural resources, because Arabic needs six grammatical forms for a number and Russian four.
  • On Android 13 and later the choice is handed to the platform and also appears under the system's per-app language setting.

Seventeen languages, chosen inside the app

The picker is a full in-app selector. It does not read the phone's language and stop there: a device set to English can run Googly Player in Bengali, and a device set to Turkish can run it in Japanese. The two settings are separate on purpose, so the app's language is whatever the person using it picks.

These are the languages it ships, each listed by its own name:

  • 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 (ગુજરાતી)

That set spans several scripts and two right-to-left languages, which is why the rest of this article is about the mechanics rather than the translations themselves. A translated string file is the easy part; making every one of those files reach the device and render correctly is where the work is.

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

A picker people can find their language in

Every language is listed by its endonym, its own name in its own script, as the primary label, with the English name underneath. Someone looking for Gujarati sees ગુજરાતી first. That matters most for the person who has opened the app in a language they cannot read and needs to find their way back: the label they recognise is the one written in their own script.

The list is searchable, and a Suggested section at the top is built from the device locale, so the likeliest choices sit where the eye lands first. Arabic and Urdu names are anchored correctly for right-to-left text inside the picker itself, rather than being forced into the left-aligned layout their neighbours use.

How the language picker is organisedThe device locale feeds a Suggested section and a searchable list; each row shows the endonym first and the English name below it.How a language row is labelledDevice localeSuggested sectionSearchable listEspañolSpanishEndonym firstEnglish name below
The device locale only shapes the Suggested section; every row leads with the language's own name.

One setting for the whole process

The common shortcut is to change the locale on the current activity. It works on the screen you are looking at and nowhere else. Googly Player plays media in the background through a foreground media playback service, posts a media notification, and uses bottom-sheet dialogs throughout. An activity-only locale change would leave every one of those in the old language.

We apply the choice process-wide through AppCompatDelegate.setApplicationLocales. That covers services, notifications and dialogs as well as activities, so the playback notification on the lock screen and the dialog that pops over the player use the same language as the library behind them. There is one place where the language is set, and everything in the process reads from it.

Where the language choice is appliedA single setApplicationLocales call reaches activities, services, notifications and dialogs; on Android 13 and later the choice also goes to the system language setting.setApplicationLocalesActivitiesServicesNotificationsDialogsAndroid 13 and laterSettings › Apps › Language
One call sets the language for every part of the process, and on Android 13 and later the system setting reflects it too.

Android 13 and later: the system knows too

Android 13 introduced per-app languages at the platform level, and on those devices we hand the choice to the platform rather than keeping it to ourselves. Pick a language inside Googly Player and it also appears under Settings › Apps › Googly Player › Language. Change it there and the app follows.

The practical effect is that there is never a disagreement between what the app shows and what the system says about it. A user who forgets where they changed the language can find it in either place, and the system's own language screen stays an accurate record of how the app is configured. On older devices the in-app picker does the whole job on its own.

Valley lights at duskLayered hills at dusk with small houses whose windows are lit, a river winding between them and clouds drifting overhead.

Every translation ships in the base APK

This is the failure that would have cost the most to find. By default, an Android App Bundle splits resources by language, and Play delivers only the resources matching the device's system language. For most apps that saves a little space. For an app with its own language picker it is fatal, because the translations the user is choosing between were never installed.

The symptom gives nothing away. Pick Russian on an English phone, and the picker renders everything in English. No crash, nothing in the logs, no error to search for. So we disable language splits in the App Bundle deliberately, and every translation ships in the base APK. Each of the 17 languages is on the device from the first install, whatever the system language happens to be.

Language splits on versus disabledWith language splits on, only the system language ships and the picker silently shows English; with splits disabled, every translation is in the base APK and the picker works.Language splits onSplits disabledOnly system language shipsPicker shows EnglishNo crash, nothing loggedEvery translation in base APKPicker shows chosen languageAll 17 languages work
The left column fails without any visible error, which is exactly why the build setting on the right is deliberate.

Numbers that sit where the language expects them

Every count in Googly Player is formatted, never concatenated. The string resource reads “Total Videos: %d” and the number is substituted into it; the code never builds “Total Videos: ” followed by the number glued on the end. The difference looks cosmetic in English and is wrong in Arabic and Urdu, where concatenation puts the number on the wrong side of the label.

A format string lets each translation decide where the number goes. The Arabic translator places the placeholder where Arabic grammar and right-to-left reading put it, and the code does not need to know. That rule applies across the app, so the library counts and the sectioned search results, such as “Videos · 12” or “Photos · 87”, follow the language rather than the code's word order.

Plurals and right-to-left layouts

A format string solves position but not grammar. Arabic uses six grammatical forms for a number and Russian four, and no single format string can express that: “%d videos” is only right for some values. Googly Player uses proper Android plural resources, so each translation supplies every form its language needs and the platform picks the correct one for the count.

Arabic and Urdu also get full right-to-left support, which reaches as far as the language picker itself, where their names are anchored correctly. Taken together with formatting and plurals, this is what separates an app that has Arabic strings from one that reads naturally in Arabic.

Formatting counts and plural formsConcatenating a label and a number puts the number on the wrong side in Arabic and Urdu, while a format string places it correctly; Arabic needs six plural forms and Russian four.ConcatenatedTotal Videos: + nWrong side in RTLFormattedTotal Videos: %dRight side in Arabic, UrduGrammatical forms for a numberArabic6Russian4
Format strings fix where the number sits; plural resources fix which word form goes with it.

What it needs, and how to switch languages

Googly Player runs on Android. The in-app picker works on its own on every supported version, because every translation is installed with the app. On Android 13 and later the choice is also shared with the system, so it shows up in the per-app language screen. Nothing about the language setting needs an account or a network connection; the translations are part of the installed app, and the app's own permission prompts state that nothing is uploaded and everything stays on the device.

  1. Open the language picker

    It sits inside Googly Player, independent of your phone's system language.

  2. Find your language

    Check the Suggested section built from your device locale, search the list, or look for the language's own name in its own script.

  3. Select it

    The choice applies across the app, including background playback notifications and dialogs.

  4. On Android 13 or later, use either place

    The same setting appears under Settings › Apps › Googly Player › Language, and changing it there changes the app.

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 app can run in any of its 17 languages whatever the phone is set to.

Does the language change reach the media notification?

Yes. The choice is applied process-wide through AppCompatDelegate.setApplicationLocales, which covers services, notifications and dialogs as well as activities.

Why does Googly Player install every translation instead of just mine?

Because the picker needs them. With App Bundle language splits on, Play would install only the system-language resources and the picker would silently fall back to English, so splits are disabled and every translation ships in the base APK.

Are Arabic and Urdu laid out right to left?

Yes. Both have full right-to-left support, counts are placed with format strings so numbers land on the correct side, and plurals use proper plural resources.

  • #Android localisation
  • #Googly Player
  • #RTL Arabic Urdu
  • #format strings
  • #in-app language picker
  • #plural resources

Comments

Add a comment
Sign in with Google to join the conversation