开发者

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

开发者 https://www.devze.com 2023-04-08 18:29 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this po
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 3 years ago.

Improve this question

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 translat开发者_如何学JAVAe English to French)


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.


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.


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

0

精彩评论

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

关注公众号