Language selector now supports language extension.

git-svn-id: https://svn.libreccm.org/ccm/trunk@4963 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2017-08-30 13:53:09 +00:00
parent cd911e44ea
commit 9c7badbb42
2 changed files with 12 additions and 2 deletions

View File

@ -121,7 +121,17 @@
select="if (./@locale = $lang) select="if (./@locale = $lang)
then concat('language-selector-', ./@locale, ' selected') then concat('language-selector-', ./@locale, ' selected')
else concat('language-selector-', ./@locale)"/> else concat('language-selector-', ./@locale)"/>
<xsl:with-param name="href" tunnel="yes" select="concat('?lang=', ./@locale)"/> <!--<xsl:with-param name="href" tunnel="yes" select="concat('?lang=', ./@locale)"/>-->
<xsl:with-param name="href" tunnel="yes">
<xsl:choose>
<xsl:when test="substring($data-tree/@url, string-length($data-tree/@url) - 2, 1) = '.'">
<xsl:value-of select="concat(substring($data-tree/@url, 0, string-length($data-tree/@url) - 1), ./@locale)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('?lang=', ./@locale)" />
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="language-name" <xsl:with-param name="language-name"
tunnel="yes" tunnel="yes"
select="foundry:get-static-text('', concat('language/', ./@locale))"/> select="foundry:get-static-text('', concat('language/', ./@locale))"/>

View File

@ -145,7 +145,7 @@ public class SciProjectList extends AbstractComponent {
orderBy)); orderBy));
projectsQueryStatement.setString(1, categoryId); projectsQueryStatement.setString(1, categoryId);
projectsQueryStatement.setString(2, GlobalizationHelper projectsQueryStatement.setString(2, GlobalizationHelper
.getNegotiatedLocale().getLanguage()); .getNegotiatedLocale().getLanguage());
projectsQueryStatement.setInt(3, limit); projectsQueryStatement.setInt(3, limit);
if (request.getParameter("page") == null) { if (request.getParameter("page") == null) {