Closed (fixed)
Project:
Internationalization
Version:
4.7.x-1.x-dev
Component:
Module i18nmenu
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2006 at 00:15 UTC
Updated:
11 Dec 2006 at 15:45 UTC
I'm suprised this hasn't elicited more grief from people. I have a site that uses french and english. I have my primary navigation and use the Nice Menu module (which use the core menu.inc) for running my secondary nav. When switching languages, the secondary nav items no longer receive their class="active" when necessary. This is a huge bug as it compromises the core navigation of any site using a similar layout. Hope others agree and this issue is resolved. I'm sorry but this is my first time using Drupal and I'm having a hard time understanding how everything is pieced together, otherwise I would take it upon myself to try and fix this.
Comments
Comment #1
davemybes commentedI use pretty much the same setup as you for my site: eng & fr with Nice Menus. I have not had a problem with the class="active" going missing - it gets added each time. I didn't modify any of the modules in any way.
Just so you know, I am using drupal 4.7.2, nice_menus 1.2.2.2 2006/03/30 and i18n.module 1.30 2006/05/31.
To do my menus, I used Primary menu for the english links and created a second menu called Liens primaires for the french. Each menu is in its own block, set to display only on en/* and fr/* respectively.
If that doesn't help, the only other thing I can suggest is to check that your CSS is correctly targeting active class in both menu sets. Make sure you didn't add something specific only to the english menus to the CSS rule.
Let me know if that helps.
Comment #2
Roberto Gerola commentedHere there is a rewritten l() function in contrib.inc file that should work.
I've reworked a similar patch that I've written for my localizer module.
Not tested with i18n module, but it should work.
It works regardless of what link you have used in your menu structure :
with or without a locale prefix.
Hope this helps.
Comment #3
bcom commentedI have used this code of Roberto's and it works perfectly. My setup is slightly different than incrn8's. I had one primary menu and provided translations to it for french, rather than having a separate menu that is visible for each language. I created the secondary_links using nice menu's. This is a great and easy way to have a fully functional bilingual site. Thanks Roberto
Comment #4
jose reyero commentedThis is closely related to http://drupal.org/node/80820 so please follow up there.
Roberto's suggestion will work -Thanks
I'm not including any core patches in i18n though.