Hello,

I'm using localizer 5.x-3.3.
Everything works perfectly except for the Primary and Secondary menu.
None of them have the .active class when I'm in the node. Wether it be the orignial node or the translated node.

To translate the menu I used the Administer › Content management › Localizer content translation

Comments

teebo’s picture

I forgot to mention that I have pathauto activated.

teebo’s picture

Thanks for the reply.

Here is the link to the website: link

lupus78’s picture

I have the same issue! Did you found the solution?

teebo’s picture

Priority: Normal » Critical
Status: Active » Postponed (maintainer needs more info)

No unfortunately, I haven't!

Anyone??

lupus78’s picture

For me it works on the Home link (the primary link pointing to the front page), and on links, which points to views, but the other links i have are all pointing to translated content items, with translated URL aliases, so this is why i think it's not working. Would be nice to find a workaround for this problem!

teebo’s picture

That's exactly my issue too.
works fine, views work fine, but any translated menu does not work.

teebo’s picture

Title: Menu links not .active » Found a solution

I found a solution.

Thanks to this note: http://drupal.org/node/41629#comment-364435

It's a dirty solution because you have to modify common.inc; but it does the job (until a real fix can be found).

Line #1275 in common.inc; replace:
if (($path == $_GET['q']) || ($path == '<front>' && drupal_is_front_page())) {
By
if (($path == $_GET['q']) || ($path == '<front>' && drupal_is_front_page()) || (drupal_get_normal_path(i18n_get_lang(). "/". $path) == $_GET['q'])) {

Roberto Gerola’s picture

You are posting an i18n issue on localizer issue list.
Move this issue to the correct project, please.

teebo’s picture

Priority: Critical » Normal

Hi Roberto,

I'm using Localizer 3 and not i18n.
But the fix I found does work (oddly enough). Since Drupal stores the current language in it's (partly built-in) i18n variables, it outputs the language prefix to the $path and makes it work.

If you have a better solution, or the equivalent of i18n_get_lang() for localizer; I would be glad to implement it.

For info, I have not installed the i18n module on this site (using Drupal 5.7).

Thanks.