How to change language in android based on web service

主宰稳场 提交于 2019-12-11 00:15:30

问题


Currently, I'm working on the Android project where I'm using English as a primary language. I'm using strings.xml file for string constants.

Now, I want to change language dynamically based on web service. This service will be created based on user choice(In Settings).

I know we have to create separate strings.xml file for every language support.

But In my case, the user will create the string constants in the server application for multilingual support. Those strings will be converted into JSON web service. Now, I want to access that service and change the language dynamically.

Also, how to store those strings locally(SharedPreference or Realm DB or anything else)

来源:https://stackoverflow.com/questions/44242745/how-to-change-language-in-android-based-on-web-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!