用于翻译中文的国际化 [英] Internationalization when used to translate for Chinese language

查看:73
本文介绍了用于翻译中文的国际化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java项目中遇到了国际化问题.

I am having trouble with the Internationalization in my java project.

将英语单词翻译为中文时,某些字符会显示为问号.

When translating words from English to Chinese some characters are rendered as question marks.

public static void main(String[] args) 
{
    String lang="ch";
    String country="CH";
    Locale l=new Locale(lang,country);      
    ResourceBundle r = ResourceBundle.getBundle("com.neomandi.prototype/Bundle_ch_CH",l);
    String val = r.getString("average"); 
    System.out.println(st);     
}

我无法在日食中粘贴中文单词.当我这样做时,它将更改为\u5E73\u5747.

I am not able to paste the Chinese word in eclipse. When i do so it changes to \u5E73\u5747.

推荐答案

似乎配置存在问题. 要在Eclipse中粘贴unicode字符,请将编码更改为unicode. 为使输出在输出中显示Unicode字符,请更新运行配置.

Seems like there is problem with configuration. For pasting unicode character in eclipse change the encoding to unicode. For output display unicode character in output, update run configuration.

这篇关于用于翻译中文的国际化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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