国际化:
“查找、替换”
.properties
ResourceBundle,Locale,MessageFormat类
Locale.getAvailableLocales();
非西欧字符:native2ascii name1.properties name1_zh_CN.properties
Locale myL=Locale.getDefault(Locale.Category.FORMAT); //getDefault() 1.7后不用了
//ResourceBundle类静态方法
ResourceBundle rb=ResourceBundle.getBundle("name1",myL);
使用顺序:系统优先调用.class
name1_zh_CN.class
name1_zh_CN.properties
name1_zh.class
name1_zh.properties
name1.class
name1.properties
MessageFormat类.format() P273
P275 codes7.6不懂
to be continued
0301
猜你喜欢
转载自huadianfanxing.iteye.com/blog/2359755
今日推荐
周排行