I'm using i18n_menu on my site. Using the translate interface export function, I exported the menu entries as a .pot file. After translation, I imported the .po file manually using the import interface. On import, I checked the "Menu" text group. The import is successful, I can see my translations when searching for translated string in the Menu text group. It also report having 100% of the menu translated.

But the menu entries are not translated when displayed in my menu block.

If I remove the translation for a menu entry, edit the entry back to have it's title re-added to the translatable string and edit the translation through the translate interface, it works and the menu entry is translated when displayed in a block.

CommentFileSizeAuthor
#7 menu_translate.module.txt3.09 KBryan_courtnage
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Priority: Critical » Normal
Issue tags: +Release blocker

If you could let us know what changes on the locales_* tables for that strings when importing and when manually updating, that would be a great help.

Does the 'location' field (below the source string) shows up after importing?

dougn7’s picture

The same is happen to me. Translateds menu items simple doesnt show, even dev version (2010-Jul-31). Im using Drupal 6.17.

dougn7’s picture

The same is happen with taxonomy... It doesnt show translated terms when switch languages.

pbuyle’s picture

Sorry for the response delay. I'm not currently able to reproduce the issue to inspect the locales_* table.

ryan_courtnage’s picture

Note that if the menu link id (mlid) in your 'menu_links' table does not exactly match the id used in the .pot file (ex: "#: item:687:title"), then you may experience symptoms that are very similar to those described in this ticket. You might want to check for that... especially if you, say, exported .pot on your staging server, and are trying to import the translated .po on your development or production server. Doesn't deploy very well....

emman31’s picture

I came across the same problem on a Drupal 7 installation with the latest 1.8 i18n version.
My problem is exactly what ryan_courtnage says, my menu link id are not the same on each sites.

That make me wonder, is there another way of exporting menu translation other than keeping the mlid? From my point of view, the translation shouldn't depend on that information.

ryan_courtnage’s picture

FileSize
3.09 KB

@emman31

Attached is some custom code (a custom D6 module) that I wrote to deal with the problem. Basically, it assumes that you have all your menu translations in a file named "menu.po". After this file is imported by locale.module, it will attempt to correct all of the mlids in your {locales_source} table by doing a query for the menu title. It served us quite well, and you might find it useful. To use it, you will have to change the strings "menu-myusermenu-menu" and "menu-myadminmenu-menu" to the names of your own menu(s). (Note that I did some find/replace to get rid of our company and product name - should be okay, but there might I may have missed/broke something).

More recently we decided to just forgo the Drupal menu system completely and simply build our own menu links in the theme.

joseph.olstad’s picture

Issue summary: View changes
Status: Active » Closed (outdated)