-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi There,
I am trying to implement Internationalization in my project using ZK 5.0.8
Netbeans 6.9.1
my properites file. "13-label_es.properties"
app.title=internacionalización
my zul file:
<?xml version="1.0" encoding="UTF-8"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window apply="com.TestInt" title="${labels.app.title}">
My ZK application
</window>
</zk>
when i run this in Firefox or any browser
it displays like this.
internacionalizaci\u00f3n
I also set my Browser charset to UTF-8
can any one please help me
Thnanks in advance
I have the same problem jaja... I tried with:
<?page title="new page title" contentType="text/html;charset=ISO-8859-1"?>
But nothing.... how can we show words with accent correctly in ZK internationalization?
ZK requires labels.properties files to be UTF-8. You'll need to make sure your editor correctly saves them as UTF-8.
For example, at least Eclipse always forces properties files to be ISO-8859-1 which breaks ZK. In Eclipse you can right-click on the properties file and set it to UTF-8. I'm pretty sure Netbeans has a similar feature.
Some editors even automatically escape non-ISO-8859-1 characters which would explain \u00f3 in your example. You should try a basic text editor (not Netbeans) and check that the accent character is really there.
You basically have two choices:
1. Force ZK to use ISO-8859-1
I don't recommend this because it might break all the existing localization in ZK. If you want to try it, set the library property org.zkoss.util.label.web.charset.
2. Fix your editor so that it saves as UTF-8
Try to find out if Netbeans can support UTF-8 properties files. If not, you could try editing properties files with another editor that supports UTF-8 properties correctly.
Thanks gekkio,
It works, i created all the properties files using jEdit and set the file charset to UTF-8.
Regards
Asked: 2011-10-28 09:29:03 +0800
Seen: 357 times
Last updated: Oct 31 '11