0

Labels in a jar

asked 2012-11-13 11:07:16 +0800

Neus gravatar image Neus
1415 14

Hi,
I'm implementing i3-label to internationalize my application. I create some .properties files in WEB-INF and declare its path in a custom configuration file that is indicated in zk.xml this way:

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

The custom configuration file has this strucutre:
<zk>
<system-config>
	<label-location>/WEB-INF/i18n/Generales/i3-label.properties</label-location>
        ...
</system-config>
</zk>

Now I need to create some label.properties files in external jars. How can I create and add its path to the web project?

Thank you!

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2012-11-13 11:22:48 +0800

Neus gravatar image Neus
1415 14

I read about creating the properties files in a metainfo folder in the jar? But then, how can I indicate the path in the custom configuration file?

link publish delete flag offensive edit

answered 2012-11-19 08:14:17 +0800

Neus gravatar image Neus
1415 14

Can anyone help me?

link publish delete flag offensive edit

answered 2012-11-19 08:58:41 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi Neus,
I do not think label-location element of system config can handle loading properties files from jar.
I think you can refer here and implement a LabelLocator based on url to these custom properties files in jar (you still need to figure out url to your properties file though). The idea is to load them from jar file yourself and register through the LabelLocator listener.
Feel free to post a feature request

link publish delete flag offensive edit

answered 2012-11-19 19:19:23 +0800

mgvv gravatar image mgvv
127 2

Hi Neus,

I put zk-label.properties in metainfo package and Zk find this file in jar.

Miguel

link publish delete flag offensive edit

answered 2014-05-21 14:25:48 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

I put zk-label.properties in metainfo package and Zk find this file in jar.

Can you show us some code on how you access the files and the structure of the separated jar file.

Thanks Stephan

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-11-13 11:07:16 +0800

Seen: 92 times

Last updated: May 21 '14

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