0

ZK 5.0.8 Internationalization Problem

asked 2011-10-28 09:29:03 +0800

priyankasathish gravatar image priyankasathish
6

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

delete flag offensive retag edit

4 Replies

Sort by » oldest newest

answered 2011-10-28 09:47:52 +0800

carpolva gravatar image carpolva
155 4

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?

link publish delete flag offensive edit

answered 2011-10-28 10:51:32 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

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.

link publish delete flag offensive edit

answered 2011-10-28 13:11:09 +0800

carpolva gravatar image carpolva
155 4

Thanks gekkio, I'm using Eclipse and I changed the properties files configuration, now I can see the accents on screen jeje :)

Regards.

link publish delete flag offensive edit

answered 2011-10-31 11:36:57 +0800

priyankasathish gravatar image priyankasathish
6

Thanks gekkio,

It works, i created all the properties files using jEdit and set the file charset to UTF-8.

Regards

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-10-28 09:29:03 +0800

Seen: 357 times

Last updated: Oct 31 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More