Page MenuHomePhabricator

[Spike] Investigate multi-locale support
Closed, ResolvedPublic

Description

Android 7[0,1] features improved locale support:

Android 7.0 now lets users select multiple locales in Settings, to better support bilingual use-cases. Apps can use a new API to get the user's selected locales and then offer more sophisticated user experiences for multi-locale users — such as showing search results in multiple languages and not offering to translate webpages in a language the user already knows.

Along with multi-locale support, Android 7.0 also expands the range of languages available to users. It offers more than 25 variants each for commonly used languages such as English, Spanish, French, and Arabic. It also adds partial support for more than 100 new languages.

Apps can get the list of locales set by the user by calling LocaleList.GetDefault(). To support the expanded number of locales, Android 7.0 is changing the way that it resolves resources. Make sure that you test and verify that your apps working as expected with the new resource resolution logic.

This ticket encompasses the work necessary to:

  • Review the changes at a high level.
  • Create new tickets for any required changes in 7.
  • Update T142019 for long term changes.

Example of two language configuration from Nougat:

screenshot-2016-09-14-14-31-19-062810572.png (2×1 px, 75 KB)
screenshot-2016-09-14-14-31-40-133732398.png (2×1 px, 68 KB)

[0] https://developer.android.com/about/versions/nougat/android-7.0.html#multi-locale_languages
[1] https://developer.android.com/guide/topics/resources/multilingual-support.html

A four-hour tour. Er, spike.

Event Timeline

Change 425290 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Auto-detect list of installed/enabled system languages.

https://gerrit.wikimedia.org/r/425290

Change 425290 merged by jenkins-bot:
[apps/android/wikipedia@master] Auto-detect list of installed/enabled system languages.

https://gerrit.wikimedia.org/r/425290