xslt template – Dynamicweb translate

Følgende XSLT anvendes til translate-funktionalitet i XSLT-templates i Dynamicweb CMS:

  <xsl:template name="translate">
    <xsl:param name="translationkey" />
    <xsl:param name="defaulttranslation" />
    <xsl:choose>
      <xsl:when test="$translationfile/translations/
            key[@name=$translationkey]">

        <xsl:value-of select="$translationfile/
                key[@name=$translationkey]/
                translation[@culture=$currentlanguage]" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$defaulttranslation" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
Advertisements

2 thoughts on “xslt template – Dynamicweb translate

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s