I have a multi language app. I want to give the user the ability to control which language to use. that mean that even if he has the English Locale he could use a different language if he wants. How can I change the Locale language? (per app)
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Some apps like BetterKeyboard need to change some system settings for it to work. Instead of changing it themselves, they have a button that sends the user to the exact window where info should be changed. I guess that's done with an Intent. If I were you, I would try to achieve that. If user want's to change his/her locale, send him/her to the locale settings of their phone.
Android provides no way to change the locale of your application; it is done at a system-wide level.
Which I would imagine makes more sense than having to set the language in multiple individual apps.
Edit, 2010-03-09:
Apparently I'm wrong about it not being possible per-app.
Here's a question showing that you can alter the locale — apparently per-Activity. In this case you need to take care of screen rotation and other configuration changes manually as otherwise the
Activity
will be restarted and revert to its originalConfiguration
when something changes.Changing Locale within the app itself
Android - Forced locale resetted on orientation changes