Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Imported from
Source
Stylesheet i18n.xsl
Documentation

Description

TEI stylesheet definitions common for all of HTML, FO and LaTeX outputs

This software is dual-licensed: 1. Distributed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/ 2. http://www.opensource.org/licenses/BSD-2-Clause All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Author: See AUTHORS

Id: $Id: i18n.xsl 11133 2012-11-15 11:58:44Z rahtz $

Copyright: 2011, TEI Consortium

Imported from
Stylesheet version 2.0
Template i18n
Documentation

Description

[common] give language-specific version of a word or phrase

Parameters

word the word(s) to translate
Namespace No namespace
Used by
References
Template
Variable
Key
Parameter
Parameters
QName Namespace
word No namespace
Import precedence 7
Source
<xsl:template name="i18n">
  <xsl:param name="word"/>
  <xsl:variable name="Word">
    <xsl:value-of select="normalize-space($word)"/>
  </xsl:variable>
  <xsl:variable name="local">
    <xsl:call-template name="myi18n">
      <xsl:with-param name="word">
        <xsl:value-of select="$word"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="string-length($local)>0">
      <xsl:value-of select="$local"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:for-each select="$i18n">
        <xsl:choose>
          <xsl:when test="key('KEYS',$Word)/text[@xml:lang=$documentationLanguage]">
            <xsl:value-of select="key('KEYS',$Word)/text[@xml:lang=$documentationLanguage]"/>
          </xsl:when>
          <xsl:when test="key('KEYS',$Word)/text[@lang3=$documentationLanguage]">
            <xsl:value-of select="key('KEYS',$Word)/text[lang3=$documentationLanguage]"/>
          </xsl:when>
          <xsl:otherwise>
            <!--
		      <xsl:if test="$verbose='true'">
		      <xsl:message>NO TRANSLATION for <xsl:value-of 
		      select="$word"/> in <xsl:value-of select="$documentationLanguage"/></xsl:message>
		      </xsl:if>
		  -->
            <xsl:value-of select="key('KEYS',$Word)/text[@xml:lang='en']"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Template myi18n
Documentation

Description

[localisation] dummy template for overriding in a local system

Parameters

word the word(s) to translate
Namespace No namespace
Used by
Template
Parameters
QName Namespace
word No namespace
Import precedence 7
Source
<xsl:template name="myi18n">
  <xsl:param name="word"/>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Template contentsHeading
Documentation

Description

[common] Prefix text before an auto-generated table of contents
Namespace No namespace
Used by
Template
References
Template
Import precedence 7
Source
<xsl:template name="contentsHeading">
  <xsl:call-template name="i18n">
    <xsl:with-param name="word">contentsHeading</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Template contentsWord
Documentation

Description

[common] Title for "Contents"; by default uses language-specific lookup table.
Namespace No namespace
Used by
Template
References
Template
Import precedence 7
Source
<xsl:template name="contentsWord">
  <xsl:call-template name="i18n">
    <xsl:with-param name="word">contentsWord</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Template feedbackWords
Documentation

Description

[common] Title for "Feedback"
Namespace No namespace
References
Template
Import precedence 7
Source
<xsl:template name="feedbackWords">
  <xsl:call-template name="i18n">
    <xsl:with-param name="word">feedbackWords</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Template searchWords
Documentation

Description

[common] Title for "Search"; by default uses language-specific lookup table.
Namespace No namespace
References
Template
Import precedence 7
Source
<xsl:template name="searchWords">
  <xsl:call-template name="i18n">
    <xsl:with-param name="word">searchWords</xsl:with-param>
  </xsl:call-template>
</xsl:template>
Stylesheet location ../common2/i18n.xsl
Parameter documentationLanguage
Namespace No namespace
Used by
Template
Source
<xsl:param name="documentationLanguage">en</xsl:param>
Stylesheet location ../common2/i18n.xsl
Parameter lang
Documentation

Description

The language to use when generating text (use ISO 2-letter codes)
Namespace No namespace
Source
<xsl:param name="lang">en</xsl:param>
Stylesheet location ../common2/i18n.xsl
Parameter doclang
Documentation

Description

[common] Prefix text before an auto-generated table of contents

Description

The language the text is in (use ISO 2-letter codes)
Namespace No namespace
Used by
Source
<xsl:param name="doclang"/>
Stylesheet location ../common2/i18n.xsl
Variable i18n
Namespace No namespace
Select document('../i18n.xml',document(''))
Used by
Template
Source
<xsl:variable name="i18n" select="document('../i18n.xml',document(''))"/>
Stylesheet location ../common2/i18n.xsl
Key KEYS
Namespace No namespace
Match entry
Use key
Used by
Template
Source
<xsl:key match="entry" name="KEYS" use="key"/>
Stylesheet location ../common2/i18n.xsl