summaryrefslogtreecommitdiff
path: root/help3xsl/localized.xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2017-09-02 11:48:43 -0300
committerOlivier Hallot <olivier.hallot@edx.srv.br>2017-09-02 16:58:52 +0200
commitde0193157e3b09f5da4ac1a1f17625cc3bf62c14 (patch)
tree24c31fc28b06014ac4346e62fd9a72ca7be5575c /help3xsl/localized.xsl
parentc23137d31109336ceed3d429aa60c360c62eba25 (diff)
Add localization to helponline UI
* Add support for localization in helponline UI. + translate 4 words + prepare for focused google search * Tweak the index search, open search index for all modules. Change-Id: Id7ad4fd63fe1f9d1334fb65febdee6f60c24361a Reviewed-on: https://gerrit.libreoffice.org/41839 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Diffstat (limited to 'help3xsl/localized.xsl')
-rw-r--r--help3xsl/localized.xsl74
1 files changed, 74 insertions, 0 deletions
diff --git a/help3xsl/localized.xsl b/help3xsl/localized.xsl
new file mode 100644
index 0000000000..c5b0a8afc8
--- /dev/null
+++ b/help3xsl/localized.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-->
+<!--
+Stylesheet map language-dependent parameters and translation
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template name="getContents">
+ <xsl:param name="lang"/>
+ <xsl:choose>
+ <xsl:when test="$lang='en-US'"><xsl:text>Contents</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-GB'"><xsl:text>Contents</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-ZA'"><xsl:text>Contents</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt-BR'"><xsl:text>Conteúdo</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt'"><xsl:text>Conteúdo</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>Contents</xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template name="getIndex">
+ <xsl:param name="lang"/>
+ <xsl:choose>
+ <xsl:when test="$lang='en-US'"><xsl:text>Index</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-GB'"><xsl:text>Index</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-ZA'"><xsl:text>Index</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt-BR'"><xsl:text>Índice</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt'"><xsl:text>Índice</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>Index</xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template name="getSearch">
+ <xsl:param name="lang"/>
+ <xsl:choose>
+ <xsl:when test="$lang='en-US'"><xsl:text>Find</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-GB'"><xsl:text>Find</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-ZA'"><xsl:text>Find</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt-BR'"><xsl:text>Pesquisar</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt'"><xsl:text>Pesquisar</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>Find</xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template name="getLanguage">
+ <xsl:param name="lang"/>
+ <xsl:choose>
+ <xsl:when test="$lang='en-US'"><xsl:text>Language</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-GB'"><xsl:text>Language</xsl:text></xsl:when>
+ <xsl:when test="$lang='en-ZA'"><xsl:text>Language</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt-BR'"><xsl:text>Idioma</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt'"><xsl:text>Idioma</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>Language</xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+<!-- Token for Google search WIP -->
+<xsl:template name="getToken">
+ <xsl:param name="lang"/>
+ <xsl:choose>
+ <xsl:when test="$lang='en-US'"><xsl:text>123456</xsl:text></xsl:when>
+ <xsl:when test="$lang='fr'"><xsl:text>123456</xsl:text></xsl:when>
+ <xsl:when test="$lang='pt-BR'"><xsl:text>123456</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>1234567890</xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+