mediatribe.net -- Drupal and Web Development

Notice: this post was last updated 6 years 15 weeks ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

Language Switcher Block: Not displaying the active language in Drupal 6

Most of our clients have bilingual (French and English) websites. The Language Switcher Block is a great way to switch between languages, but we often don't want to display the active language. For example, on a French-language page, we want to have a link to English (not French and English).

Our solution is to add the following css either to your theme, or, if you are using a contrib or core theme, to css injector. (Messing with a core or contrib theme will cause your changes to be lost during upgrades):

.block-locale .active {
  display: none;
}

This tells the browser not to display the active language.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.