[UP] The UI language |
The element ui:iflang This element checks whether the current language is the language specified by xml:lang. If the result is true, the inner nodes are expanded and the condition code is set to true; otherwise the inner nodes are ignored, and the conditon code is set to false. For an overview about multi-language support, see the chapter about Internationalization. Declaration Level: Control structure <!ELEMENT ui:iflang ANY> <!ATTLIST ui:iflang xml:lang CDATA #REQUIRED> Attributes
Sub elements All page body elements may occur as sub elements. The l namespace This element can be abbreviated as follows: Instead of <ui:iflang xml:lang="TOKEN">TREE</ui:iflang>one can write <l:TOKEN>TREE</l:TOKEN> Example <ui:cond> <l:en>One</l:en> <l:de>Eins</l:de> <l:it>Uno</l:it> <l:es>Uno</l:es> </ui:cond>Due to the implementation it is currently not recommended to use the combination ui:cond/ui:iflang as substitute for message catalogues if the number of languages is bigger than a small number (three or four). (May be improved in the future, however.) Hints Note that template parameters and bracket expressions within ui:iflang are unconditionally evaluated. See ui:cond for a discussion of the consequences of this fact. |