OpenWGA 7.11 - TMLScript reference
TMLContext "this"Method :
label([[container, ] file, ] key [, params])
label(database, container, file, key , params [, returnPlaceholder])
On object | TMLContext "this" |
Usage |
Returns a WebTML label in a language that the user should understand |
Description |
Labels are text fragments with unique keys, carrying some single information for usage in the websites design. A label of a given key may be available in multiple languages, making it able to provide it in different languages for different users, effectively allowing multi-language designs. This method is the TMLScript pendant of WebTML tag <tml:label>. For further information about labels see there. There are two variants of the label method. A simpler variant 1, which will always use the current design database and a variant 2 which will let you choose the database. For using label functionality inside custom TMLScript objects see function WGA.design().label() which is able to find the correct design context of your object. When used in non-web environment the label method returns labels in the language of the main context. |
Parameters |
database (WGAPI object WGDatabase): Variant 2: Design database from which to load labels. container (String, optional in variant 1): File container basename (without language suffix) holding label files. When omitted uses the currently active default container basename, "labels" if not determined. Hint: To access labels of overlay designs inside a base design script use "overlay:labels" as container name. file (String, optional in variant 1): |
Return value |
Textlabel (String) |
Allowed in script types |
|