# How to set up a custom zk-label.properties in a location other than /WEB-INF

cvarona
554 1 6

Hi,

I need to customize some zul labels on a deployment, but I cannot copy my zk-label.properties in the web application's WEB-INF directory. It must be hold within a library jar. According to the customization and packing code guide it's possible to independently configure any jar containing zk stuff by including a metainfo/zk/config.xml file. However, the means to specify label locations are the same as those in the main config.xml file: either absolute file locations or WEB-INF locations. I've peeped into the WebManager and Labels code and there is no way to set up an alternative label locator (a custom, classpath based one). Well, I've tried to register something like

Labels.register( new LabelLocator() {
public URL locate( Locale locale ) throws Exception {
return getClass().getClassLoader().getResource( "metainfo/zk/my-own-zk-label.properties" ); // For every locale, so that it's easier to see whether it works or not
}
} );

in my WebAppInit, with no success.

Any suggestion will be welcome.

César Varona

delete retag edit

## 2 Replies

cvarona
554 1 6

Forget about it, the Labels.register scheme does the trick (I had forgotten to specify the message code prefix, such as MZul.2050=...).

With kind regards

César

9393 3 7 16
http://www.oxitec.de/

Cesar,

many thanks
Stephan

[hide preview]