The site has English and Dutch(default).

I've not translated any menu or content.
English is mainly there because I like it for the admin interface.

Even though the 'Main menu' string has a translation superfish's small-screen menu show the untranslated version.

It seems to have changed a bit from 1.9 to the latest dev so I'll post two patches.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

Status: Active » Needs review
FileSize
749 bytes
544 bytes
ordermind’s picture

The dev patch looks weird, you're actually trying to translate a boolean. I'm attaching a new patch for dev that is tested and works. $output['subject'] appears to come from the menu title so you should be able to talk to i18n_menu to get the translated menu title if present, but in the meantime this should be fine.

Caspa’s picture

Thanks @helmo. I used the patch superfish-7.x-1.9-2160409-1.patch in #1 and it works very well.
the site is in English an dutch (default) with the module l10n_update installed. Nice job!

Caspa’s picture

Status: Needs review » Reviewed & tested by the community
Leksat’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
734 bytes

I have found 3 sources from where the title can come:
1. superfish_small*_* variables
2. menu item
3. menu title

In my opinion, the text coming from superfish_small*_* variables should be translated via the i18n_variable module. The translation should be possible if there is a hook_variable_info() implementation. My patch does not provide it.

Menu title/item translations are normally handled my the i18n_menu module. If the title comes from a menu item, the translation is loaded automatically in menu_link_load().

My patch handles the third case, when the title comes from the menu title.

  • mehrpadin committed e47caf3 on 7.x-1.x authored by Leksat
    Issue #2160409 by helmo, ordermind, Leksat: Title for the small-screen...
mehrpadin’s picture

Status: Needs review » Fixed

Hey,

Patch applied, please check, thanks.

Status: Fixed » Closed (fixed)

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

hstoellinger’s picture

Hello,
I still have the problem that - using "smallscreen" and an accordion menu for viewports less than 560px - the menu-title is not translated. My default language is German, but the site is multilingual (+ English and Italian). My menu title is "Menü" (u-Umlaut) in German and should be "menu" in both the other languages. I have looked at your patch for the superfish.module. However, I see that MY superfish module (version 8.x-1.3) looks very different, The patch seems to be for version 7.x.... Eg., there is no SELECT statement at all in MY superfish.module, and it is MUCH smaller.
I also see that - in the "smallscreen" case - the "normal" (non-accordion) menu is displayed for a second or so before the Accordion-style menu gets displayed. This surely cannot be "works as designed"! Any ideas?
Is there a chance for me to solve these issues?
Regards
H. Stoellinger
Austria