0

I have message.properties file. by default it will load as English when I use Locale and Resource Bundle in Java file. Now, I need to specify the Country Code or Type in Locale, Then the message.properties file key values should be load as the specified Country in Locale. How can I do this.?

4

1 回答 1

1

Oracle在这里有一些示例代码。

基本上,您使用正确的语言创建捆绑包,Locale然后加载它:

ResourceBundle.getBundle("LabelsBundle", currentLocale);

有关国际化的更多信息..

另外,在提出问题之前,请尝试自己搜索一下......

于 2013-01-11T15:19:51.807 回答