mediatribe.net -- Drupal et développement web

Notice: this post was last updated Il y a 1 year 18 weeks 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.
  • Vous pouvez publier du code en utilisant les balises <code>...</code> (generic) ou bien <?php ... ?> (PHP colorié).

More information about formatting options

Image CAPTCHA
Enter the characters shown in the image.