简体   繁体   中英

Android app in a language other than English

I apologize for this simple question, I am new to Android development.

I am developing an Android app that will be ALWAYS localized in a language other than English. In other words, there will be only one UI language no matter what the Android system language is, and this UI language is not English.

Now, all documentation I read about localization suggests setting the resources in English (the default language), and then add other resources for other supported locales.

This would not work for my particular situation. I need the non-English language to always be used no matter what the OS language is.

Is there a way of setting default language in AndroidManifest.xml to be something other than English? If not, how can I do that?

Thanks.

Just put all your resources, written in your single desired language, into the default folders. They will be used if language-specific folders matching the device's current locale aren't found. The convention is that the default folder contain resources in English, but there's nothing that enforces it.

The main problem you'll encounter is that any messages, dialogs, etc. generated by the system (and not from your resources) will continue to match the device's current locale.

As a best practice you should always use Strings.xml(or create a resource file for strings). You can use the language of your choice to specify the value for each name,value pair you create in string resource file.

Just use have the default resources in the language of your choice. If there are no localized resources, this language will be displayed, no matter what the device settings are: http://developer.android.com/guide/topics/resources/localization.html

Correct me if I'm wrong, but I think the only reason for having English as the default language is, that one can assume it might be understood by a user who's device language is not supported by the app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM