Name

[T] l10n-xml-language — Determine the language of the given XML fragment

Synopsis

<xsl:template name="l10n-xml-language">
  <xsl:param name="target" select="." /></xsl:template>

Returns the language of the XML content at the given node, as determined by the lang or xml:lang attribute.

The result is always given in a normalized form: language_code-country_code, with the language_code and country_code always in lower case. The -country_code may be missing.

No checking is done to make sure the language code is valid.

Parameters
target

The (element) node to find out the language for. Defaults to the context node.