controlling the user language on Android

前端 未结 2 1813
死守一世寂寞
死守一世寂寞 2020-12-31 18:20

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

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 18:52

    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 original Configuration when something changes.
    Changing Locale within the app itself
    Android - Forced locale resetted on orientation changes

提交回复
热议问题