Plasma GitLab Archive
Projects Blog Knowledge

The UI language
 ui:alist-value and ui:alist-item
 ui:dyn-enum-value and ui:dyn-enum-item
 ui:enum-value and ui:enum-item
 ui:enumeration and ui:enum
 ui:text and ui:password
 t:*, q:*, and p:*
 Dot notation (v1.v2)
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.


Level: Control structure

<!ELEMENT ui:iflang ANY>

<!ATTLIST ui:iflang
          xml:lang CDATA #REQUIRED>

  • xml:lang: Specifies the language to check for.

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


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.)

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.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml