📄 listing7-31_32_localizationtrap2.txt
字号:
// Another Invalid Locale Call, Because Parameters Are Given Directly
// never do this:
this.menuScreen.append( Locale.get( "game.StartMessage" ),
new String[]{ userName, enemyname } ); // the new String[]{..} will break the preprocessing....
Instead, define the parameters before the actual call:
// Corrected Locale Call
// this is fine:
String[] parameters = new String[]{ userName, enemyname };
this.menuScreen.append( Locale.get( "game.StartMessage" ), parameters ); // this works fine
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -