I asked this question a few days ago regarding on how to display the language labels in item view instead of its ISO version. How to apply these in sidebar facets and its search filters? I can't find the xslt for generating the displayed values in the sidebar facets.
In the image above, I would like to change the displayed values into:
English (5325)
French (432)
Chinese (8)
Khmer (5)
Japanese (2)
And then when clicking for example the sidebar facet for French, the displayed value in the search filter should be Language Equals French
and not like the image below (Language Equals fr
):
Thanks in advance.
What I have tried
I don't know if this is the most efficient way to do this so any advice would be appreciated.
<xsl:template
match="dri:list[@n='language']/dri:item/dri:xref/text()
| dri:list[@id='aspect.discovery.SidebarFacetsTransformer.list.language']/dri:item/text()
| dri:div[@id='aspect.discovery.SearchFacetFilter.div.browse-by-language-results']/dri:table/dri:row/dri:cell/dri:xref/text()">
<xsl:apply-templates select="*[not(name()='head')]"/>
<xsl:variable name="language">
<xsl:value-of select="substring-before(.,' (')"/>
</xsl:variable>
<xsl:for-each select=".">
<xsl:value-of select="concat(util:isoLanguageToDisplay($language),' (', substring-after(.,'('))"/>
</xsl:for-each>
</xsl:template>
The language labels of the dc.language.iso in my sidebar facets is now displaying properly both in the home page and search results.
When clicking View More
:
My only problem now is this:
I don't know how to override the advanced search filters or if this is even possible.