Needs work
Project:
Internationalization
Version:
7.x-1.x-dev
Component:
Compatibility
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
2 Aug 2011 at 04:44 UTC
Updated:
8 Sep 2017 at 10:12 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedNote: we are using user-account language only, so the language detection is based on the $user, not on path or domain.
Comment #2
Anonymous (not verified) commentedAlternatively, using the Language neutral, which is supposed to allow for basic localization, does not work either: in both languages the Default site language is show, i.e. "Home" for both languages. The translation is never shown.
Comment #3
totap commentedI have this problem too.
For example: I have menuENitem and menuPLitem. When I switch to english there show up menuENitem and menuPLitem. When I switch to polish lang there is no menu items.
I've noticed that it is when menu is created with Block menu module.
Edit: ups - this my problem is wiht 7.x-1.0-rc2 version
Edit2: I've realized that it's other issue after what happened here: http://drupal.org/node/1236450#comment-4824064
Comment #4
Anonymous (not verified) commented@totap aha, I was actually also using 7.x-1.0-rc2. Is it solved in the devx?
Comment #5
jose reyero commentedAre you displaying the menu through standard Drupal core blocks, links, etc?
Comment #6
totap commentedNow I'm probably know what's your problem. I have the same. The menu items shows in all languages when they depends the same path.
I.E.:
HomePL - path
HomeEN - path
and they all show uped and it doesen't matter if you changeing language on site they all stay up.
The way I've got this problem was 1 or more from below (listed in order I made):
* created taxonomy and few items + their translations
* created menu items for that taxonomies terms - translate seems work fine
* reorder items in menu - sometimes with problem, so I've make order by Edit->and set up weight manually (not by drag and drop)
I suppose the last thing could have something - it seems that drag&drop reorder don't works good. With translated taxonomy terms I have drag&drop issues too.
Today I've make only those few things and menu items showed up with all languages, but only for those items with common path (i.e. or taxonomy/term/1 - gallery in my case)
Comment #7
Anonymous (not verified) commentedI'm using the Nice Menus module and showing in page.tpl.php like this:
print theme('nice_menus_primary_links', array('depth' => 1, 'direction' => 'down', 'menu' => NULL));>> The menu items shows in all languages when they depends the same path.
Same case, my paths are identical, I just need to translate the label. I also tried this through the Translate Interface for menu's, unsuccesfully.
Comment #8
totap commentedHm... I think that problem is theme/module dependent. I've back to Bartik theme and it works as should.
After checking 1 thing it's something with dropdown menu items. When you have normal menu i18n works good. If you use Nice menu (for drop down list of submenus item) the issue come.
Comment #9
Anonymous (not verified) commented@totap, so you are also using Nice Menus? Ok, then we found the problem at least.
Now try to find the solution...
Comment #10
Anonymous (not verified) commentedChanging title to reflect our new insight.
Comment #11
jose reyero commentedDocumenting. See http://drupal.org/node/1240340
Comment #12
totap commented->morningtime I'm not useing nice menu module but i'm useing theme with custom primary menu with option "dropdown" like in nice menu module. When I'm turning OFF dropdown option, menu items shows correct.
Comment #13
totap commented->morningtime I solved my problem in that way:
Useing 2 languages:
1. create taxonomy with: Translate. Different terms will be allowed for each language and they can be translated.
1a. create terms
2. create 2 menus Lang1 and Lang2 with: Fixed Language. Menu items will have a global language and they will only show up for pages in that language.
3. put this 2 menu bock in the same region
It's working for me quite good and allow use dropdown menu :)
Comment #14
jose reyero commentedSome notes about this:
- i18n localizes menus in page_preprocess()
- Any other module like nice menus, if you want the menus translated, needs to use i18n API, running the menus through i18n_menu_localize_tree()
Otherwise, we cannot fix it on i18n side, so both modules are just not compatible, which is properly docummented on i18n handbook.
Suggested workaround is creating on menu for each language, as explained in #13.
So, nothing we can do here, you can post a feature request to Nice menus for that module to handle this.
Comment #15
boran commentedIt was not easy for me to follow everything above, but I think at one stage totap tried to use the Menu Blocks module?
I also found that it did not work correctly with localized menus, and the reason was an incorrect use of i18n_menu_localize_tree() - it might have changed between D6 and D7, see #1341418.
So that may also be the problem with nice menus too, actually see 1095722 it should be fixed too.
Comment #16
stompeduns commentedSolution: Go to your page.tpl.php file and change all the menu_tree functions into i18n_menu_translated_tree.
Problem solved. i18n will now translate your menu.
Comment #17
forexpivots commentedI honesty hate these recommendations to hack the core Drupal files, such as page.tpl, etc.
I had been struggling with this issue for a while, and yet the solution was so damm simple (as most of the "difficult issues")
Forget anything said above, all you have to do is:
* Delete every single menu (primary, if that's the case).
* Recreate the menus from their own page menu block.
* Don't worry about assigning weight (just drag and drop later)
This works like a charm!
Somehow, if you don't delete the menu, it seems that "traces" are left behind somewhere in the Drupal code.
Hope this helps...any questions, just ask!
Comment #18
forexpivots commentedComment #19
webflo commentedComment #20
kidd1126 commentedthank you very much
Comment #21
jose reyero commentedOk, you can add it to the documentation.
Still, closing, see #14
Comment #22
MickL commentedWhen changing the menu settings to "Translate and Localize" the pages seem to have cached data. You dont have to create a new menu like #17 said. Just go edit every page and save it(without doing anything). Now the page will only show up on its own language.
In my opinion there should be a kind of batch which refactors all nodes when changing the menu translation settings.