show languages choices in native languages
The standard way to show a list of languages available in an app is to show each language's name in that language. For example, https://www.Facebook.com shows this at the bottom of the page: English (US), Deutsch, Français (France), Italiano, Português (Portugal), Shqip, Español, Türkçe, ?????, ????. Even better is to get the caps right for each language, which you can see at the bottom of https://www.debian.org/. That is easy to do by querying the Android system for the name of the language.
This code is all available in ChatSecure for the taking, so this should be easy to implement in Courier:
This code also automatically generates the list of supported languages based on which languages are actually included in the APK, so you don't have to manually maintain any lists in the code.
One thing to check: some of the Courier stuff seems to mix up Simplified Chinese (
zh_CN) and Traditional Chinese (
zh_TW). I imagine that the Courier is aimed at China (
zh_CN) rather than Taiwan (@zh_TW), but the app description page https://guardianproject.info/apps/courier/ uses @zh_TW here: "Chinese (???)"
#3 Updated by hans almost 3 years ago
So I checked my dev build from my pull request, it does indeed have native language and caps. One thing I did notice is that Chinese is listed as ??, where the convention is to also include whether it is Traditional or Simplified. Here's how Debian differentiates:
- zh_CN: ??(?)
- zh_HK: ??(HK)
- zh_TW: ??(?)
- ??(??) - Traditional Chinese (Taiwan)
- ??(??) - Simplified Chinese (China)
- ??(??) - Traditional Chinese (Hong Kong)
#5 Updated by hans almost 3 years ago
Also, I just noticed for Turkish, it says "Türk" where it should be something like "Türkce" but with the C with the squiggle at the bottom. In Courier, the names of the languages are hard-coded in
app/res/values/strings_notranslate.xml, where instead you can get the names of the languages from Android itself (except on older devices that don't support that language, like Tibetan). That
Languages.java file above has code to do that. That's how its handled in ChatSecure now.