Change app language programmatically in Android

前端 未结 30 2962
面向向阳花
面向向阳花 2020-11-21 04:34

Is it possible to change the language of an app programmatically while still using Android resources?

If not, is it possible to request a resource in an specific lan

30条回答
  •  不知归路
    2020-11-21 05:23

    Take note that this solution using updateConfiguration will not be working anymore with the Android M release coming in a few weeks. The new way to do this is now using the applyOverrideConfigurationmethod from ContextThemeWrapper see API doc

    You can find my full solution here since I faced the problem myself: https://stackoverflow.com/a/31787201/2776572

提交回复
热议问题