Last updated 25 October 2016. Created on 12 March 2015.
Edited by MXT, mengi, RajabNatshah, Mohammed J. Razem. Log in to edit this page.

Installation

This module requires optional core module: "Locale".
The module will populate a new block named "Language switcher dropdown" under "{host}/admin/structure/block".

Please see the below instructions to configure the block.

Configuration

  1. Configure the "Language negotiation" at
    "{host}/admin/config/regional/language/configure".
  2. Enable the "Language switcher dropdown" block at "{host}/admin/structure/block".
  3. Configure the "Language switcher dropdown" block settings as follows:
    • "Output as HTML and JavaScript widget instead of HTML select element"
    • The option will allow you to display the widget using themable HTML and JavaScript widget instead of the default select element.

To add the language switcher by code:

  $lang_dropdown = lang_dropdown_block_view();
  print render($lang_dropdown['content']);

To add language icons inside the menu

To show the icon inside using the languageicons module, you have to use one of the javascript outputs: Marhoob Suleman dropdown library, chosen library or ddslick library.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.