CSS to hide language switcher

  • 24 April 2024
  • 4 replies
  • 49 views

Userlevel 6
Badge +5

Is your community not ready for the language switching enhancement yet? Or do you just want to actually set it up before your community sees it? 

I found this in a very helpful reply from @Mark Jongeling in the thread for this product update.

.main-navigation--language-switcher {
display: none !important;
}

Great enhancement, less than ideal roll out IMO. 


4 replies

Userlevel 3
Badge +2

Thanks a lot @Mark Jongeling, and @DannyPancratz for sharing it in this topic 🙂

@DannyPancratz Where in the Custom CSS are you placing this code? Does it matter?

Userlevel 6
Badge +5

@KathrynMCarter No, it doesn’t matter. (Edit: well, it matters if you insert it into some other CSS already in there, don’t put it in the middle of anything already there. Just add it before or after what you have in there already.)

Also, I learned from a former GS support staffer that it’s good to “document” your CSS with some non-CSS-code before and after. That way, when you look at it later (or if someone else is looking at it) they know what it’s for (and don’t delete it / break it, etc). 

Here’s what mine looks like: 

/*start hide LANGUAGE SWITCHER*/
.main-navigation--language-switcher {
display: none !important;
}
/*end hide language switcher*/

 

Userlevel 5
Badge +4

Hey folks, apologies for the confusion here - the language selector is definitely meant to be opt-in, and was not meant to become visible on all communities.  We fixed it yesterday, so there’s no longer a need to employ custom CSS to hide it.

Reply