如何使用Java编程将一种语言翻译成另一种语言 [英] How to translate one language to another using java programming

查看:410
本文介绍了如何使用Java编程将一种语言翻译成另一种语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,有一个内容部分.用户可以在其中查看四种差异语言的内容.有没有办法,我将内容放在一种语言中,然后根据用户的选择,我的java程序将其翻译为所选的语言,现在用户可以将其查看为该所选的语言.(例如,将英语翻译为法语)

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)

推荐答案

取决于您的实现,ResourceBundles可能是您所需要的,请参见:

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

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

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

这篇关于如何使用Java编程将一种语言翻译成另一种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆