Title: Hide active language
Last modified: March 20, 2020

---

# Hide active language

 *  Resolved [thaflo](https://wordpress.org/support/users/thaflo/)
 * (@thaflo)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/)
 * Dear team,
 * I would like to realize a language switcher like the one on the top right of 
   the site this post links to.
 * I do not want to have dropdown menu, as I have only 2 languages to switch between.
   
   If DE is active, IT should be shown, and if IT is active, DE should be shown.
   My current status is visible on: [https://www.thaler-online.com/ig-new/](https://www.thaler-online.com/ig-new/)
   How could I achieve this? Thanks for any help.
 * Florian
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhide-active-language%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12579159)
 * Hello Florian,
 * Thank you for getting in touch!
 * We have a step by step documentation on how to achieve this:[https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/](https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/)
 * Please let me know if you come across any issues.
 * With the best regards,
 *  Thread Starter [thaflo](https://wordpress.org/support/users/thaflo/)
 * (@thaflo)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12581367)
 * Thank you so much, I did the solution without the plugin and it worked flawlessy.
   
   Have a nice day! Florian
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12582466)
 * Hello Florian,
 * Thank you for letting me know!
 * Good luck with your project.
 * With the best regards,
 *  [rhpg](https://wordpress.org/support/users/rhpg/)
 * (@rhpg)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12597636)
 * Dear Dragos or colleague,
 * Just like Florian, 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/](https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/).
 * CSS Classes is checked, but I don’t know how to correctly edit my language menu
   items, adding a custom class. After adding the language switcher items to the
   menu, these CSS fields automatically contain: “trp-language-switcher-container”.
   I tried adding tp_nl and tp_en (like: “trp-language-switcher-container-tp-en”)
   but this doesn’t work.
 * => How/where should I add tp_en and tp_nl in order to make this work?
 * FYI: under Extra CSS I added:
    .translatepress-en_US .tp_en, .translatepress-
   nl_NL .tp_nl { display: none; }
 * Thank you so much for your help, I’m really struggling with this
 *  Thread Starter [thaflo](https://wordpress.org/support/users/thaflo/)
 * (@thaflo)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12598218)
 * Hello rhpg!
    In the menus “CSS Classes” you have to insert like this: “trp-language-
   switcher-container tp_it” Adding means here to add the css class, not to attach
   something to the first class. So try “trp-language-switcher-container tp-en” 
   instead of “trp-language-switcher-container-tp-en”
 * Greetings,
    Florian
 *  [rhpg](https://wordpress.org/support/users/rhpg/)
 * (@rhpg)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12606615)
 * Dear Florian, Dragos or colleague,
 * I added tp-en resp. tp-nl as suggested in CSS Class field of the language switcher
   menu items, and 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. Something strange is 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/](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,
    Rob
    -  This reply was modified 6 years ago by [rhpg](https://wordpress.org/support/users/rhpg/).
 *  Thread Starter [thaflo](https://wordpress.org/support/users/thaflo/)
 * (@thaflo)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12608170)
 * Hi Rob,
 * yes, I have additional CSS classes in my CSS field, too. but nevertheless, it
   works here.
    Maybe we have different preferences in Plugins->TranslatePress? 
   This are mine: [https://i.imgur.com/X35Mxxp.png](https://i.imgur.com/X35Mxxp.png)
 * I added
 *     ```
       .translatepress-it_IT .tp_it, 
       .translatepress-de_DE .tp_de
       { display: none; }
       ```
   
 * in the Design/Customizer/CSS field
 * Florian
 *  [rhpg](https://wordpress.org/support/users/rhpg/)
 * (@rhpg)
 * [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12610365)
 * Thank you FLorian for sharing your thoughts and screenshot. My preference settings
   were the same, except that I had flags instead of short names. Changing according
   to your settings didn’t help unfortunately. Also, our Extra CSS code is the same.
 * Maybe there’s something wrong in my menu settings. Here I have 2 Language Switcher
   elements with (initially) the following settings:
 * 1:
    Label: Dutch CSS Class: trp-language-switcher-container tp_nl
 * 2:
    Label: English CSS Class: trp-language-switcher-container tp_en
 * (this is what I enter, as explained the system ads to these CSS Class codes itself)
 * Are these Menu elements and CSS Class entries the same as yours?
 * Many thank for your help!
 * Kind regards,
    Rob

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Hide active language’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [Translate Multilingual sites - TranslatePress](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [rhpg](https://wordpress.org/support/users/rhpg/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/hide-active-language/#post-12610365)
 * Status: resolved