voyent
Localization on commandButtons  XML
Forum Index -> Components
Author Message
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


What is the proper way of localizing ice:commandButtons? I am using unicode encoding for localization. Both outputText and commandButtons don't work because they use the value attribute. I supposed the value attribute isn't parsed with locale information. The label attribute of outputLabel works as expected.

I find using the value attribute for button labels to be counter-intuitive, since the value should be allowed different from the label. May I ask what is the correct way of handling this? Pointing me to some reference is also very much appreciated. Thanks.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Are you binding the value attribute of the commandButton and outputText to a ResourceBundle? You can get more information here: http://java.sun.com/developer/technicalArticles/Intl/ResourceBundles/
And here for the integration with JSF here:
http://www.laliluna.de/javaserver-faces-message-resource-bundle-tutorial.html
and here for Creator tools and support:
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/internationalizingapps.html

Thanks,
Philip

.
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


Yes, I'm binding the value attribute to resource bundles. The problem with most of the examples is that they use European languages as examples. What I'm having trouble with is actually with double-byte characters like Chinese.

Despite saving a properties file in with utf-8 encoding, having the characters showing up nicely in most common editors, and the jsp page marked as content-type utf-8, the characters simply do not get interpreted properly.

But thanks, I'll check out the links.
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


Apparently... localization on buttons work in CE 1.0.0. I actually reverted the libraries to test some other things and found out that the buttons now display double-byte unicode characters without a problem. I went back to 1.0.1 and the buttons don't parse the unicode again.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Ok, thanks. This might be a new bug in v1.0.1 then. I'll get our developers to look into it right away. Btw, the Java Studio Creator article has some good info on internationalizing with multi-byte characters.

Thanks again,
Philip

.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team