4

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.

Sidebar facet of language

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):

enter image description here

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.

enter image description here

When clicking View More:

enter image description here

My only problem now is this:

enter image description here

I don't know how to override the advanced search filters or if this is even possible.

Community
  • 1
  • 1
euler
  • 1,401
  • 2
  • 18
  • 39
  • I am missing something about your question. What is the tool or environment? What piece of software displays the "Filters" UI, for which you are giving us pictures? – Jim DeLaHunt Jan 12 '17 at 03:33

0 Answers0