Translate

The Translate tag allows the static text to be automatically translated according to the current language. The Translate tag supports three parameters:

  • A translate key which act as key for all translations of the particular text.
  • A default text parameter

The default text parameter allows you to add a default text, which will be displayed when the key has not been translated in a particular language. The default value is added after the terminology key in quotes.

In Razor:

@Translate(“TEXTKEY”) @Translate(“TEXTKEY”, “Default Value”)

In HTML:

<!--@Translate(TEXTKEY)--> <!--@Translate(TEXTKEY, “Default value”)-->

The value is generated automatically according to either the translated value for the current language or (if the value can not be found) to the default value.

  • The translate key can only contain English characters (in lower and upper case), numbers (0-9), dot (.), colon (:) and lower dash (_).