Plasma GitLab Archive
Projects Blog Knowledge


[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:translate

This element is replaced in the generated HTML output by the corresponding external value of the specified internal value of a declared enumerator.

The external value is HTML-quoted before being processed; i.e. the characters <, >, &, and " are substituted by the corresponding HTML entities &lt;, &gt;, &amp;, and &quot;, respectively.

Declaration

Level: Generative

<!ELEMENT ui:translate EMPTY>
<!ATTLIST ui:translate
          type     NMTOKEN #REQUIRED
          internal NMTOKEN #REQUIRED>
Attributes

  • type: Specifies the name of a declared enumerator type (see ui:enumeration).

  • internal: Selects the internal value of the declared enumerator type.

Sub elements

ui:translate does not have sub elements.

Example

The following piece of code simply displays "Two":

<ui:dialog name="sample" start-page="sample_page">
  <ui:enumeration name="smallnumbers">
    <ui:enum internal="1" external="One"/>
    <ui:enum internal="2" external="Two"/>
    <ui:enum internal="3" external="Three"/>
  </ui:enumeration>

  <ui:page name="sample_page">
    <html>
      <body>
        <ui:translate type="smallnumbers" internal="2"/>
      </body>
    </html>
  </ui:page>
</ui:dialog>
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml