How to translate one language to another using java programming [closed]

邮差的信 提交于 2019-12-12 09:46:45

问题


in my project, there is a content section. where user can view contents in four diff languages. Is there any way, that i put contents in one language, and according to user's choice my java program translate it to the selected language and now user can view it to that selected language.(Say for example translate English to French)


回答1:


http://code.google.com/apis/language/translate/overview.html

Google Translate provides an API for just that. Of course, the translations aren't always good.

And you have to pay money for it.

Alternative: you write your content in every language you support, and at the correct event you update the UI with another version.




回答2:


I assume that you're not talking about machine translation. Take a look at ResourceBundles, but the solution depends also on the frameworks you are using.




回答3:


Depending on your implementation ResourceBundles may be what you are looking for, see:

http://java.sun.com/developer/technicalArticles/Intl/ResourceBundles/

and

http://download.oracle.com/javase/6/docs/api/java/util/ResourceBundle.html



来源:https://stackoverflow.com/questions/7580465/how-to-translate-one-language-to-another-using-java-programming

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