Language handling for Foundry implemented as described in #2186

git-svn-id: https://svn.libreccm.org/ccm/trunk@2981 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-11-21 09:21:08 +00:00
parent c3115830e8
commit 983d54fab7
3 changed files with 11 additions and 3 deletions

View File

@ -13,6 +13,6 @@
--> -->
<!--<setting id="parent-theme">foundry</setting>--> <!--<setting id="parent-theme">foundry</setting>-->
<setting id="site-logo">foundry/images/scientificcms_logo.png</setting> <setting id="site-logo">images/scientificcms_logo.png</setting>
</foundry:configuration> </foundry:configuration>

View File

@ -190,9 +190,17 @@ processor, some are read from the configuration files of Foundry and some are de
</foundry:doc> </foundry:doc>
<xsl:param name="negotiated-language" select="'en'"/> <xsl:param name="negotiated-language" select="'en'"/>
<!-- Temporary workaround until https://redmine.libreccm.org/issues/2186 is decided -->
<xsl:variable name="lang"> <xsl:variable name="lang">
<xsl:choose>
<xsl:when test="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language[@locale=$negotiated-language]">
<xsl:value-of select="$negotiated-language"/> <xsl:value-of select="$negotiated-language"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages/language[@default='true']/@locale"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable> </xsl:variable>
<!--<foundry:doc section="devel"> <!--<foundry:doc section="devel">

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB