0

Internationalization using custom file path doesn't work

asked 2012-10-03 09:08:03 +0800

Neus gravatar image Neus
1415 14

Hi,
I'm trying to implement internationalization using i3-labels.
I want to have multiple label files, so I must indicate the path of them in a configuration file.
I don't want to have all the pathes in my zk.xml so I created a custom congifuration file.
I indicate where it is in zk.xml that way:
zk.xml:

<library-property>
	<name>org.zkoss.zk.config.path</name>
	<value>/WEB-INF/config/i18n.xml</value>
</library-property>

It seems that this custom file is found because when starting Tomcat this appears on the console:

INFO: Parsing /WEB-INF/config/i18n.xml

But it seems that an error occurs when this file is read because labels aren't loaded.
Checking the console I can see this:

GRAVE: Unknown element: label-location, at [null:null:3:18]

This is my custom config file i18n.xml:

<?xml version="1.0" encoding="UTF-8"?>
<system-config>
	<label-location>/WEB-INF/i18n/Pyme/Archivos/Empresas/CentrosExplotacion/i3-labelCentrosExplotacion.properties</label-location>
</system-config>

Does anyone knows why this is happening?
Thank you!

delete flag offensive retag edit

1 Reply

Sort by » oldest newest

answered 2012-10-03 09:20:08 +0800

Neus gravatar image Neus
1415 14

updated 2012-10-03 09:23:04 +0800

I found it!
zk tags where missing. So custom config file finally looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<zk>
<system-config>
<label-location>/WEB-INF/i18n/Pyme/Archivos/Empresas/CentrosExplotacion/i3-labelCentrosExplotacion.properties</label-location>
</system-config>
</zk>


Now I have another problem...When labels with special characters are loaded this symbol � appears.
For example instead of Descripción it shows Descripci�n. How can I solve it?

Thank you!

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: 2012-10-03 09:08:03 +0800

Seen: 70 times

Last updated: Oct 03 '12

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