开发者

Select a language from android app?

开发者 https://www.devze.com 2023-03-25 03:38 出处:网络
In my android app I need to do something like this: I have 5 languages. When app starts the user choose one of them from a spinner list. For each language there is a string.xml file. The question is:

In my android app I need to do something like this: I have 5 languages. When app starts the user choose one of them from a spinner list. For each language there is a string.xml file. The question is: there is possible what I'm trying to d开发者_运维百科o or not?


Implement the tutorial for localization. It's only only a few steps and well-explained.


A setup like that would be unneccessary as the Android system handles this. Having your different language xml files will suffice (make sure you name them correctly, see the link posted by Raz). Android picks out the right file based on the language selected by the user within the Android OS settings.


Yes, you can do this by changing the Locale of the application. There's a similar question in here, see Changing Locale within the app itself


Yes, it is. Details: http://developer.android.com/guide/topics/resources/localization.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号