Example 6: Language dependend locale formats

Format of numbers and dates can be different from country to country.
This aspect can be held by the language files, too.

{doubleval}
{ts}
{dateval}
{ts}
{ts}

Mark the content that should be formated by use the swac_lang_format attribute:


<div id="translator_example6_present" swa="Present FROM ../../../data/userinterface/translator/example4/example_datasets.json">
    <div class="swac_repeatForSet">
        <div swac_lang_format="decimal">{doubleval}</div>
        <div swac_lang_format="datetime">{ts}</div>
        <div swac_lang_format="date">{dateval}</div>
        <div swac_lang_format="time">{ts}</div>
        <div swac_lang_format="day">{ts}</div>
        <hr>
   </div>
</div>
        

Supported formats are:

ValueExplanation
decimalFormats the value as decimal value. e.g. 12.4
datetimeFormats the value as datetime value.
dateFormats the value as date value.
timeFormats the value as time value.