Warning and Error Messages"
m |
|||
Line 3: | Line 3: | ||
__TOC__ | __TOC__ | ||
− | + | =Overview= | |
− | + | ZK's messages (such as warnings and errors) are packed in property files (<code>*.properties</code>) under the <tt>/metainfo/mesg</tt> directory of the classpath. These mesages are grouped into modules, such as zcommon, zweb, zk and zul. These files are Locale depedent. For example, the message file of <tt>zk.jar</tt> for Germany messages is <tt>msgzk_de_DN.properties</tt> or <tt>msgzk_de.properties</tt>. | |
− | + | = Translate messages to another language = | |
− | + | If you want to translate messages to another language, you can add your own property files named with the correct Locale, and put it to the <tt>/metainfo/mesg</tt> directory of the classpath. Of course, it is always better to contribute it back at [http://docs.zkoss.org/wiki/ZK_Mesgs ZK Mesgs] | |
− | [since | + | = Change particular message = |
+ | |||
+ | [since 6.0.0] | ||
If you want to change a particular message, you can add it to i3-label.properties. For example, let us see you want to customize <code>MZk.NOT_FOUND</code> in German translation, then you can add the following to <code>WEB-INF/i3-label_de.properties</code>: | If you want to change a particular message, you can add it to i3-label.properties. For example, let us see you want to customize <code>MZk.NOT_FOUND</code> in German translation, then you can add the following to <code>WEB-INF/i3-label_de.properties</code>: | ||
Line 26: | Line 28: | ||
! Version !! Date !! Content | ! Version !! Date !! Content | ||
|- | |- | ||
− | | | + | | 6.0.0 |
− | | | + | | n/a |
− | | | + | | Allows applications to override a particular message with <code>i3-label</code>. |
|} | |} | ||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Revision as of 06:47, 12 October 2010
Overview
ZK's messages (such as warnings and errors) are packed in property files (*.properties
) under the /metainfo/mesg directory of the classpath. These mesages are grouped into modules, such as zcommon, zweb, zk and zul. These files are Locale depedent. For example, the message file of zk.jar for Germany messages is msgzk_de_DN.properties or msgzk_de.properties.
Translate messages to another language
If you want to translate messages to another language, you can add your own property files named with the correct Locale, and put it to the /metainfo/mesg directory of the classpath. Of course, it is always better to contribute it back at ZK Mesgs
Change particular message
[since 6.0.0]
If you want to change a particular message, you can add it to i3-label.properties. For example, let us see you want to customize MZk.NOT_FOUND
in German translation, then you can add the following to WEB-INF/i3-label_de.properties
:
MZk.3000=my customized message here
where 3000 is the error code and you can find it at ZK Mesgs
Version History
Last Update : 2010/10/12
Version | Date | Content |
---|---|---|
6.0.0 | n/a | Allows applications to override a particular message with i3-label .
|