Active
Project:
Localizer
Version:
5.x-3.10
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2008 at 11:10 UTC
Updated:
16 Sep 2008 at 08:25 UTC
I can see the secondary menu translation but when i go to the primary link then the secondary link doesn't show up. But if I do edit content then it shows the secondary link correctly.
| Comment | File | Size | Author |
|---|---|---|---|
| Secondary menu showing up.png | 5.57 KB | yingtho | |
| Secondary menu not showing.png | 5.81 KB | yingtho |
Comments
Comment #1
yingtho commentedWhat I forgot to mention that this is upgraded from localizer 1.10.
Comment #2
xdiume commentedI have exacly the same problem.
Comment #3
macmladen commentedMe too.
When I disable localizer modul, I see secondary links.
Also, all themes have the same problem -> so it is not a theme issue.
Comment #4
astroboy commentedI found the reason for menu confusion; here is an explanation and temporary dirty workaround :
A little background for newbies as I am, that don't know the drupal menu system (I figured it out looking at the sources) :
The menus get generated in a $_menu variable, that gets menu items as associative arrays.
Each has a ['path'] value, that drupals gives as the "real" path to the item (node/xxx for a regular node)
Localizer's localizer_translate_all() function that gets called when building the menu replaces this path with the translated one, to properly handle language switch.
But in menu.inc, we get at line 975 (for Drupal 5.10) :
That searches the menu item's path for correspondance with the current page's path ($path here).
but the menu item's path here is not the "real" path anymore, but the aliased, translated path (could be "more_information", instead of "node/48")
so by just adding another test that re-translates the item's path to a "real" path, you can improve the detection a bit :
Here is what worked for me.
Unfortunately I don't have the time nor the knowledge to search for a proper way using only localizer, so I leave it up to you guys :)