简体   繁体   中英

how to change the data in to different language which is coming from server?

I want to provide option to the user for select or choose language, actually data stored on server is in English language .

when user choose any other language ,the whole application or app data will be change in to that selected language.

I have already visited so many links for do this task .they provide solution to make individual string for all type of data and put it in to values folder .

the main thing is that I want to display data in to different language which is coming throw parsing from the server!

so any one has idea or logic about how to convert that data run time programmatically in android ,then plz comment it...

any suggestion will be acceptable !! thanx in advance...

我想说最好的办法是寻找可以在请求数据时调用的翻译 API。

Feed the response data to the Translation API by Google or the Microsoft equivalent Bing Translator . For both you will need a unique API key.

Simple, you have to just store all languages data into backend server with some language id. Based on this language id you can dynamically display different language data in your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM