I have translated Component-Showcase's resources into Simplified Chinese and Traditional Chinese.
The attchment is two file - messages_zh_CN.properties and messages_zh_TW.properties
For the ICEfaces-1.8.1-src.zip, the two property files maybe should been placed in ICEfaces-1.8.1-src\icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\resources
For the seam-showcase-1.8.0.zip, the two property files maybe should been placed in seam-comp-showcase\src\org\icefaces\application\showcase\view\resources
You can use it with ICEfaces-1.7.2, ICEfaces-1.8.0 or ICEfaces-1.8.1.
Notice - you should edit org.icefaces.application.showcase.util.LocaleBean manually.
As the following:
Code:
public class LocaleBean implements Serializable {
...
// available locals to choose from.
private static final ArrayList AVAILABLE_LOCALES = new ArrayList(4);
static{
// setup our list of supported languages.
AVAILABLE_LOCALES.add(new SelectItem("en", "English"));
AVAILABLE_LOCALES.add(new SelectItem("de", "German"));
AVAILABLE_LOCALES.add(new SelectItem("es", "Spanish"));
AVAILABLE_LOCALES.add(new SelectItem("zh", "Chinese"));
}
...
String newLanguage = (String) event.getNewValue();
// see if matches any of our translations.
if ("en".equals(newLanguage)) {
currentLanguage = "en";
} else if ("es".equals(newLanguage)) {
currentLanguage="es";
} else if ("de".equals(newLanguage)) {
currentLanguage="de";
} else if ("zh".equals(newLanguage)) {
currentLanguage="zh";
}
...
}
There are three changes:
1. private static final ArrayList AVAILABLE_LOCALES = new ArrayList(4);
2. AVAILABLE_LOCALES.add(new SelectItem("zh", "Chinese"));
3. else if ("zh".equals(newLanguage)) { currentLanguage="zh"; }
mailto: ratking (at) ynet.com
2009-06-25