Seventeen Languages That Actually Switch: How We Built Googly Player's Language Picker

What it took to make one language choice reach every screen, notification, number and plural in our Android media player, and the build setting that quietly breaks it.

Binary Buddies · 5 min read · 0 views
An evening street in many languagesA dusk skyline of domes, towers and tiered roofs with lit windows, lanterns swaying on a string over a market street, and a figure in the foreground holding a glowing phone.

A user picks Hindi in your app's language menu. The main screens switch. Then the playback notification arrives in English, a confirmation dialog stays in English, and on some installs the whole picker does nothing at all: no crash, no warning, nothing in the logs. To the user the app just ignored them. To the developer it looks fine on their own phone.

Right-to-left languages add a second set of quiet failures. A count glued onto a label lands on the wrong side of the sentence in Arabic and Urdu. A plural written as one format string reads as broken grammar in Russian. None of these show up in a test run done in English, which is exactly why they ship.

Googly Player, our Android app for videos, music and photos, offers 17 languages through its own in-app picker, independent of the phone's system language. This is how we made that choice reach every part of the app, and the specific traps we designed around.

Key takeaways

  • The language choice is applied process-wide, so services, notifications and dialogs follow it, not just activities.
  • On Android 13 and later the choice is also handed to the platform and shows up in the system's per-app language setting.
  • Language splits are disabled in the App Bundle; with them on, Play would ship only the system language and the picker would silently fall back to English.
  • Arabic and Urdu get full right-to-left support, numbers are placed by format strings, and plurals use proper plural resources.

A picker people can read before they've switched

The first problem with any language menu is that the person who needs it most often can't read the language it's currently in. So every entry in our picker leads with its endonym, the language's own name in its own script: हिन्दी, العربية, বাংলা, 日本語, ગુજરાતી. The English name sits underneath as a secondary label for anyone who wants it.

The list is searchable, and it opens with a Suggested section built from the device locale, so most people find their language at the top without scrolling through seventeen entries. That matters most in households where one phone is shared, or where someone keeps the system in one language and wants their media app in another. Because the in-app choice is entirely separate from the system language, neither has to give way.

For Arabic and Urdu, the language names in the picker are anchored correctly for right-to-left text, so the list itself doesn't look broken to the readers those entries are for.

One choice, applied to the whole process

Many in-app language switchers only reach activities. Everything that isn't an activity, such as a background service, a notification built from a service, or a dialog, keeps resolving strings against the system locale. For a media player that is a serious gap, because the playback notification is one of the things users see most.

We apply the selection through AppCompatDelegate.setApplicationLocales, which sets it for the application as a whole. The result is that services, notifications and dialogs all pick up the chosen language alongside the screens, and the user never meets a stray English string from a part of the app they didn't think of as separate.

How one language choice reaches the whole appThe user's choice passes through setApplicationLocales, which applies it to activities, services, notifications and dialogs, and on Android 13 and later also hands it to system Settings.You pick a languagesetApplicationLocalesActivitiesServicesNotificationsDialogsAndroid 13+: system Settings
A single call fans the choice out to every part of the app, and on Android 13 and later the platform records it too.

Handing the choice to Android 13 and later

Since Android 13, the platform has its own idea of a per-app language. If an app keeps its language choice private, the system setting and the in-app setting can disagree, and users who go looking in Settings find nothing.

On Android 13 and later, Googly Player hands the choice to the platform. That means the language a user picks inside the app also appears under Settings › Apps › Googly Player › Language, and the two stay in step. Someone who prefers to manage app languages from the system side can do that; someone who never leaves the app doesn't have to know the system setting exists.

On earlier Android versions the in-app picker still works on its own, applied process-wide in the same way. The platform entry is the extra you get on newer devices, not a requirement for the feature.

Two shores at dawnA calm sea between a domed shoreline on the left and a tiered-roof shoreline on the right, with two flocks of birds crossing the sky in opposite directions under a rising sun.

The build setting that silently breaks every picker

This is the failure we'd warn any Android team about first, because it produces no symptom a developer is likely to see. An Android App Bundle can split resources by language. With language splits on, Play delivers only the resources for the device's system language. The translations for every other language never reach the phone.

An in-app picker then has nothing to switch to. The user selects Japanese, the app asks for Japanese strings, none are installed, and Android falls back to the default resources. Everything renders in English. There is no crash and nothing in the logs, so the bug survives every test done on a developer's own device, where the system language and the chosen language usually match.

We deliberately disable language splits in Googly Player's App Bundle so that every translation ships in the base APK. It costs a little install size; in return, all seventeen languages are on the device and the picker does what it says.

Language splits on versus disabledWith splits on, Play sends only the system language, so the picker shows English with no crash or log entry. With splits disabled, every translation is in the base APK and the picker renders the chosen language.Language splits onSplits disabledPlay sends system language onlyPicker shows English everywhereNo crash, nothing in logsEvery translation in base APKPicker renders chosen language
The left path fails without any visible error; the right path is the one Googly Player ships.

Right-to-left that holds up for Arabic and Urdu

Two of our seventeen languages, Arabic and Urdu, are written right to left. Googly Player has full RTL support for both. Layouts mirror as readers of those languages expect, and the picker itself anchors the names العربية and اردو correctly rather than leaving them stranded on the wrong edge of the row.

RTL support is often treated as a layout toggle and nothing more. In practice the hard cases are inside sentences, where a translated label meets a value the app calculates at runtime. That is where the next two decisions come in, and both exist because an RTL language or a language with richer grammar than English will expose a shortcut that English hides.

Numbers placed by the translation, not the code

Media apps are full of counts: how many videos, how many tracks, how many photos. The quick way to build one is to concatenate, writing "Total Videos: " + n in code. In English that reads correctly. In Arabic and Urdu it puts the number on the wrong side of the label, because the code fixed the order before the text direction was ever considered.

Every count in Googly Player is formatted, never concatenated. The string resource is "Total Videos: %d", and each translation decides where the placeholder goes. The number ends up where a native reader expects it, and translators can reorder a sentence without anyone touching code.

Concatenated versus formatted countsA concatenated string puts the number on the wrong side in Arabic and Urdu; a formatted string lets the translation place the number.Concatenated"Total Videos: " + nWrong side in Arabic, UrduFormatted"Total Videos: %d"Translation places the number
Fixing the order in code breaks right-to-left text; a placeholder hands the order to each translation.

Plurals that follow each language's grammar

English gets by with a singular and a plural, so it's tempting to handle counts with one format string, or a single if-statement around it. That doesn't survive contact with other languages. Arabic needs six grammatical forms for a number and Russian needs four, and no single format string can express which form a given count requires.

Googly Player uses proper Android plural resources. Each language supplies as many forms as its grammar needs, and the platform selects the right one for the number at runtime. A Russian user sees the correct word ending for 2, 5 or 21 items; an Arabic user sees the correct form across all six cases.

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

The languages, and how to switch

Googly Player is an Android app, and the language support works across the Android versions it runs on. Android 13 and later adds the system-level language entry described above. The seventeen languages, listed the way the picker shows them:

In the pickerEnglish name
EnglishEnglish
हिन्दीHindi
EspañolSpanish
العربيةArabic
FrançaisFrench
বাংলাBengali
PortuguêsPortuguese
РусскийRussian
اردوUrdu
Bahasa IndonesiaIndonesian
DeutschGerman
日本語Japanese
TürkçeTurkish
Tiếng ViệtVietnamese
한국어Korean
ItalianoItalian
ગુજરાતીGujarati
  1. Open the language picker

    It lives inside Googly Player and works whatever language your phone's system is set to.

  2. Search, or take a suggestion

    Type to filter the list, or pick from the Suggested section built from your device locale. Each language is shown in its own script with the English name beneath.

  3. Check it from system Settings if you like

    On Android 13 and later, your choice also appears under Settings › Apps › Googly Player › Language, and can be changed from there.

Questions

Does Googly Player's language have to match my phone's language?

No. The in-app picker is entirely independent of the system language, so you can keep your phone in one language and the app in another.

Will notifications and dialogs switch language too?

Yes. The choice is applied process-wide through AppCompatDelegate.setApplicationLocales, so services, notifications and dialogs follow it along with the app's screens.

Can I change the app language from Android Settings?

On Android 13 and later, yes: the choice is handed to the platform and appears under Settings › Apps › Googly Player › Language. On earlier versions, use the in-app picker.

Why does an in-app language picker sometimes show only English after installing from Play?

Usually because language splits are enabled in the App Bundle, so Play delivers only the system language's resources. We disable language splits so every translation ships in the base APK.

Which languages read right to left?

Arabic and Urdu. Both have full right-to-left support, including correctly anchored names in the picker and counts placed by format strings rather than concatenation.

  • #Android localization
  • #Android plurals
  • #Googly Player
  • #RTL Arabic Urdu
  • #binary buddies
  • #in-app language picker

Comments

Add a comment
Sign in with Google to join the conversation