lang helper

Previous Next

The lang helper can be used to add text translations to an HTML element. It does this by adding extra HTML elements that secure the original string.


{{lang string element-name }}


element-name  :=  "html"

String is required. The optional element-name, if specified, must be "html".



<div>{{lang props.label "html"}}</div>

can be converted to:

  <script class="lang-start" type="text/html">original text</script>
         translated text
 <script class="lang-end" type="text/html"/>

Short notation

In most cases USoft supports a short notation:

{{'Example'}} or {{"Example"}}

is equivalent for:

{{lang 'Example'}} or {{lang "Example"}}

This short notation can be useful within the HTML property of an HTMLControl.