Language Definition"

From Documentation
m
Line 10: Line 10:
 
A language definition defines a component set (aka., a language). For example, [[ZUML Reference/ZUML/Languages/ZUL|ZUL]] and [[ZUML Reference/ZUML/Languages/XHTML|XHTML]] are two component sets.
 
A language definition defines a component set (aka., a language). For example, [[ZUML Reference/ZUML/Languages/ZUL|ZUL]] and [[ZUML Reference/ZUML/Languages/XHTML|XHTML]] are two component sets.
  
To define a language definition, you have to prepare a file called <code>/metainfo/zk/lang.xml</code> and makes it available to the classpath (such as in a JAR file, or in WEB-INF/classes of a Web application). In additions, you could specify them in [[ZK Configuration Reference/JAR File's config.xml/The language-config Element|/metainfo/zk/config.xml]] in the classpath.
+
To define a language definition, you have to prepare a file called <code>/metainfo/zk/lang.xml</code> and makes it available to the classpath (such as in a JAR file, or in WEB-INF/classes of a Web application). In addition, you could specify them in [[ZK Configuration Reference/JAR File's config.xml/The language-config Element|/metainfo/zk/config.xml]] in the classpath.
  
 
A language addon is used to extend a language definition. It shall be called <code>/metainfo/zk/lang-addon.xml</code> available to the classpath, specified in [[ZK_Configuration_Reference/zk.xml/The_language-config_Element|WEB-INF/zk.xml]] (in a Web application), or specified in [[ZK Configuration Reference/JAR File's config.xml/The language-config Element|/metainfo/zk/config.xml]] (in a JAR file; classpath).
 
A language addon is used to extend a language definition. It shall be called <code>/metainfo/zk/lang-addon.xml</code> available to the classpath, specified in [[ZK_Configuration_Reference/zk.xml/The_language-config_Element|WEB-INF/zk.xml]] (in a Web application), or specified in [[ZK Configuration Reference/JAR File's config.xml/The language-config Element|/metainfo/zk/config.xml]] (in a JAR file; classpath).

Revision as of 08:48, 23 August 2011


Language Definition




This section describes what a language definition and addon are. It is required for the component component. However, you could skip it if you won't develop components. For more information about component development, please refer to ZK Component Development Essentials.


If you would like to change the default configuration of an ZK application, please refer to ZK Developer's Reference: Packing Code.

A language definition defines a component set (aka., a language). For example, ZUL and XHTML are two component sets.

To define a language definition, you have to prepare a file called /metainfo/zk/lang.xml and makes it available to the classpath (such as in a JAR file, or in WEB-INF/classes of a Web application). In addition, you could specify them in /metainfo/zk/config.xml in the classpath.

A language addon is used to extend a language definition. It shall be called /metainfo/zk/lang-addon.xml available to the classpath, specified in WEB-INF/zk.xml (in a Web application), or specified in /metainfo/zk/config.xml (in a JAR file; classpath).

When ZK starts, it will parse all language definitions and then all language addons based on their dependency. A language addon is a variant of a language definition. They are almost the same, except the naming and it must specify the addon name.




Last Update : 2011/08/23

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.