OpenWGA 7.5 - WebTML reference
WebTML tags<tml:label>
Description :
Loads a WebTML text label in a language that the current browser user understands.
WebTML labels are an OpenWGA feature to create multi language designs. A label is a piece of text, addressed by a key, that is available in multiple language translations. Labels are defined in the OpenWGA design, inside Java properties files that are placed in file containers named "labels_x" where x is a language code. Use this tag to retrieve them in a suitable language for the current browser user.
Derived from:
Attributes:
WebTML labels are an OpenWGA feature to create multi language designs. A label is a piece of text, addressed by a key, that is available in multiple language translations. Labels are defined in the OpenWGA design, inside Java properties files that are placed in file containers named "labels_x" where x is a language code. Use this tag to retrieve them in a suitable language for the current browser user.
show inherited attributes ... | |||
Name | Value(s) | Purpose | |
container | label-container |
Specifies the label container from which to retrieve the label |
|
file | label-file |
Specifies the label file from which to retrieve the label |
|
key | label-key |
Specifies the key of the label to retrieve |
|
language | label-language | Chooses an explicit language for the label to fetch. | |
param1...param5 | text |
Specifies the value of a label parameter |
Examples:
A simple label retrieval for the title of an input field. For the english language this label will be retrieved from a Java properties file "general.properties" inside a file container "labels_en":
It is good practice to organize the labels in different label properties files for different UI regions. You determine the file name by attribute file:
However it is tedious to determine the file again on each label when whole regions use the same. Therefor you can group functionalities using the same, non-standard, properties files with <tml:range labelfile>. You then can omit the file specification on the <tml:label> tag itself:
This could be the text contents of the labelfile "userform.properties" inside label container "labels_en":
<tml:label key="username"/>: <tml:input name="username"/>
It is good practice to organize the labels in different label properties files for different UI regions. You determine the file name by attribute file:
<tml:label file="userform" key="username"/>: <tml:input name="username"/>
However it is tedious to determine the file again on each label when whole regions use the same. Therefor you can group functionalities using the same, non-standard, properties files with <tml:range labelfile>. You then can omit the file specification on the <tml:label> tag itself:
<tml:range labelfile="userform">
<tml:label key="username"/>: <tml:input name="username"/> <br>
<tml:label key="phone"/>: <tml:input name="phone"/> <br>
<tml:label key="country"/>: <tml:input name="country" type="select" optionsitem="countries"/> <br>
</tml:range>
This could be the text contents of the labelfile "userform.properties" inside label container "labels_en":
username=User name
phone=Phone number
country=Country