简体   繁体   中英

Deploying an android application internationally

Hello there fellow Android developers. I am looking for some feedback. I am about to do a major international deployment of an android application. Something I need to worry about is language settings. What I have done right now is used the default language setting specific /res/values- setting where you have multiple folders called values-en, values-es, values-pt, things like that. So what I am wondering the following.

When my android default strings.xml is in English, will the way I am handling language be sufficient. It works here in development and probably deployed from the US store. But when deployed from other stores will the device think, I am from the Spanish store so the default strings.xml file should be in Spanish, or will it know, I am Spanish store so I will use values-es?

Anyways I would like feedback from someone who has deployed like this before please. It seems to be a question that is pretty guessable, however I am wanting to confirm with other developers what their experiences have been.

Thanks, Anthony

The language folder that is used is based on the user's selected language , not anything relating to where they are. You can test what each language looks like in your app by changing your device to a different language.

From my experience, the selected language resource is based on the selected language on device, so no matter which store your app is downloaded from, if the device language setting is english, values-en will be selected.

But you don't need to worry about it, as long as you have i18n files for all language you want your application to be translated to, the device will do the rest of the work for you.

If your read this page, it stated :

To add support for more languages, create additional values directories inside res/ that include a hyphen and the ISO country code at the end of the directory name. For example, values-es/ is the directory containing simple resourcess for the Locales with the language code "es". Android loads the appropriate resources according to the locale settings of the device at run time .

Add the string values for each locale into the appropriate file.

At runtime, the Android system uses the appropriate set of string resources based on the locale currently set for the user's device.

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