After I have upgraded to Language Switcher Dropdown 6.x-1.4, I see two icons instead of one in the dropdown. You can see the same at taatparya.com .

CommentFileSizeAuthor
#4 duplicate-icon-1111506-4.patch1.7 KBmanfer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Freso’s picture

Project: Language Icons » Language Switcher Dropdown
Version: 6.x-2.0 » 6.x-1.4

Actually, I just see the HTML for the image in the dropdown there. However, if the issue started after an upgrade to Language Switcher Dropdown, I'm fairly sure that'd be where the issue is to be found as well. I'd be happy to help in debugging and fixing though, but I won't be near my normal development computer until the end of April.

Mohammed J. Razem’s picture

Status: Active » Closed (duplicate)
Freso’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Closed (duplicate) » Active

And as I noted in the other issue, it's not a solution that's going to last into Drupal 7. You can postpone this if you wish, but it will pop up again.

manfer’s picture

The solution without having to change any other module parameter is changing the line:

    $select_options += array($path => $lang_option['title']);

to:

    $select_options += array($path => $lang_option['language']->native);

You are adding the icons yourself (with javascript code for the msdropdown menu and with $language_icon when msdropdown is not used) so you don't need the icons included by language icons link hook in $lang_option['title']. It is enough to have the language name in native language. With that change you don't need anymore to force language icons 'Language switcher block' parameter to false. So lines:

  if (module_exists('languageicons')) {
    variable_set('languageicons_show_block', 0);
  }

can be deleted.

I attach a patch that includes a minor change in lang_dropdown.js too.

manfer’s picture

Version: 6.x-1.x-dev » 6.x-1.5
manfer’s picture

Version: 6.x-1.5 » 6.x-1.x-dev

Ups, thought the issue was still 6.x-1.4 version and I was changing it to 6.x-1.5, I revert it back to 6.x-1.x-dev which was correct.

manfer’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.