Child pages
  • Customization via I18N

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This will return the value of your language, if your language has no entry it will return the default value/reference text : "Click OK to continue".
It is also possible to use dynamic values. You can provide an array with the values you want to replace. To use dynamic values the i18n value should contain tags like {0}, {1}, ... , {n}. The tags will be replaced by the values you provide in the same order.

Code Block
{color:#7f0055}{*}var{*}{color} company_name {color:#ff0000}={color} {color:#2a00ff}"Servoy";{color}
{color:#7f0055}{*}var{*}{color} amount {color:#ff0000}={color} {color:#800000}15{color}
{color:#7f0055}{*}var{*}{color} type {color:#ff0000}={color} {color:#2a00ff}"developers";{color}
{color:#7f0055}{*}var{*}{color} message {color:#ff0000}={color} i18n.getMessage({color:#2a00ff}"servoy.license.registered"{color},{color:#0000ff}*\[*{color}company_name,amount, type{color:#0000ff}*\]*{color});

For example if the key servoy.license.registered has the value 'Registerd to {0} with {1} {2}' the outcome will be 'Registered to Servoy with 15 developers'
You might be wondering how to know when using i18n in a dialog with button the user has clicked because depending on the language of the user the Yes button can be Si, Ja , Oui, Hai, ect.
To solve this you can get the translation in a variable and use that to check wich button is clicked.
For example:

...