By Guy Verville on
Is it possible to make the language switcher hiding the active language?
For example, I have two languages: English | Français.
I would be happier to show only Français on English pages, and English on French pages...
Is it possible to make the language switcher hiding the active language?
For example, I have two languages: English | Français.
I would be happier to show only Français on English pages, and English on French pages...
Comments
+1
10x...
+1
+1
Use CSS to hide the link for the active language page
The <li> tag for the active language will be class-tagged as "active", like so:
<a href="/services-tax" class="language-link active">English</a></li>So you can create CSS rules to hide the link for the active language that would look something like this:
div.block-locale li.active
{
display: none;
visibility: hidden;
}