Tricky Backwards-Compatible Localization
summary
Android 13’s per-language preferences backported to Android 12 via AppCompat 1.6 gets implemented by reading an XML language list, storing static sRequestedLanguages, creating a new Configuration and recreating activities through AppCompat’s static weak-ref delegate set; widgets stayed Spanish because they’re backend-driven and needed a fresh fetch. Surprising product stats: 280M installs, 20 languages, 50M monthly, Jamaica ~7% users. A language-code bug (Indonesian id vs in) required both backend and client fixes. A custom resource wrapper (PerTrackerResources) solves app-context and WebView crashes and the approach works.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker intro
- 3:43Why localization matters
- 4:46Agenda and feature overview
- 5:07Android language resolution
- 8:51Integration steps explained
- 10:44Indonesian language code issue
- 14:28Android locale code conversion
- 17:42Implementing language config
- 19:30Testing on Android 13
- 20:22Testing on Android 11
- 21:26Investigating widget issue
- 23:20How app compat rewrites resources
- 25:31Updating configuration manually
- 28:47Applying new language list
- 30:54Recreating activities safely
- 32:22Text resolver approach benefits
- 34:13Quick fix attempt with app resources
- 36:00Final hack for web view
- 37:04Summary and Q&A
related talks
15mGoing global: building for a multilingual world
10mAndroid app internationalization: users can now choose their application language
14mBuilding for a multilingual world
23mFinally OS-Level Per-App Language Settings Are Supported!
48mTips for Multilingual Support in 17 Countries
27mTexts, dates, numbers, currencies, plurals, etc. App internationalization guide
41mBuilding Android Apps for a Global Audience
52mAndroid Internationalization: How to Design an App at Global Scale
