Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

[UP]
The UI language
 ui:a
 ui:alist-value and ui:alist-item
 ui:application
 ui:button
 ui:checkbox
 ui:cond
 ui:context
 ui:default
 ui:dialog
 ui:dyn-enum-value and ui:dyn-enum-item
 ui:dynamic
 ui:encode
 ui:enum-value and ui:enum-item
 ui:enumerate
 ui:enumeration and ui:enum
 ui:false
 ui:file
 ui:form
 ui:if
 ui:ifexpr
 ui:iflang
 ui:ifvar
 ui:imagebutton
 ui:iter-*
 ui:iterate
 ui:page
 ui:param
 ui:popup
 ui:radio
 ui:richbutton
 ui:select
 ui:server-popup
 ui:special
 ui:string-value
 ui:template
 ui:text and ui:password
 ui:textarea
 ui:translate
 ui:true
 ui:use
 ui:variable
 t:*, q:*, and p:*
 l:*
 $param
 $[expr]
 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.

Declaration

Level: Control structure

<!ELEMENT ui:iflang ANY>

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

  • 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

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

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