Hide active language does not work
-
Dear team,
I want to hide the active language flag in the menu of my 2 languages website (nl_NL and en_US). So I tried as explained on https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/:
1) CSS Classes is checked
2) I added tp-en resp. tp-nl as suggested in CSS Class field of the language switcher menu items:
Label: Dutch, CSS Class: trp-language-switcher-container tp_nl
Label: English, CSS Class: trp-language-switcher-container tp_en3) I added the following code in the Extra CSS:
.translatepress-en_US .tp_en,
.translatepress-nl_NL .tp_nl
{ display: none; }However, both flags remain visible.
Maybe this is related to something strange happening in the CSS Class fields in the language switcher menu items:
– If I enter: “trp-language-switcher-container tp_nl” and close and re-open this field, it then says: “trp-language-switcher-container tp_nl trp-language-switcher-container”.
– If I close and re-open again it says: “trp-language-switcher-container tp_nl trp-language-switcher-container trp-language-switcher-container”. So for some reason it keeps on adding “trp-language-switcher-container”.
– For testing purposes, I cleared these CSS Class fields in the menu and then only entered “tp-en”. If I close and re-open the field, it then says: “tp-en trp-language-switcher-container”.I also had my website hosting provider look into this issue. He also followed the steps on https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/ but with the same outcome. They suspect that the code may be outdated.
Can you please look into what the problem is? Or better: the solution!?
Many thanks.
Kind regards,
RobThe page I need help with: [log in to see the link]
The topic ‘Hide active language does not work’ is closed to new replies.