localizeΒΆ

This localizes a phrase. See parameters for i18n.localize.

Usage in Thymeleaf:

<div data-th-text="${portal.assetUrl({'_key=mystring'})}">Not translated</div>

Usage in XSLT:

<xsl:stylesheet version="2.0" exclude-result-prefixes="#all"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:portal="urn:enonic:xp:portal:1.0">

  <xsl:template match="/">
    <xsl:value-of select="portal:localize('_key=mystring')"/>
  </xsl:template>

</xsl:stylesheet>