开发者

How to support different languages with dynamic web data on Android?

开发者 https://www.devze.com 2023-04-10 08:18 出处:网络
I have an application that pulls information from a web server and displays it. I know that Android has some nice language features where you can put mu开发者_JS百科ltiple strings.xml files inside the

I have an application that pulls information from a web server and displays it. I know that Android has some nice language features where you can put mu开发者_JS百科ltiple strings.xml files inside the project for specific languages. Is there a way to convert the text from the server (which is in english) to whatever local the user has set on their device?

Thanks


Yes, but that's usually done at the server-side with some kind of translation api. Even on Android, when an app needs content that hasn't already been pre-translated, it goes through a server for the translation.

For instance, you could use Google Translate's api (which is not free) http://code.google.com/apis/language/translate/overview.html

Or you could install some open source solution on your own server and use that remotely as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消