Menu links associated to a node with a language were hidden if they were different from the current user language.
Now my main menu display all the menu links whatever the node language is.
Is this the wanted behavior by the developers?
If yes, is there a workaround to display only current user language menu links?

Comments

webmaster-eddie’s picture

I have this problem too, and I think I also had it with the upgrade for i18n to 7.x-1.5, too!

Perhaps it is resetting the translation sets data, or requiring translation sets to be completed, even though one sets the langugage of the content node.

Subscribe.

zarabatana’s picture

Same problem.

Subscribe.

drupalok’s picture

same problem... i finally switched to one menu block per language as a workaround

rondev’s picture

Thank you for the tip.
For now I didn't find a solution for for the main menu in the Bartik theme. I can't find a way to create different language blocks for the main menu.

zarabatana’s picture

well i'll try to revert the update...for now

Grammer’s picture

Back 7.x-1.6 to
i18n-7.x-1.x-dev, 2012-05-23
which works well.

rondev’s picture

I found a possible related issue #1594804: Menu language Undefined when it inherits language from node. I will have a look.

Edit: the patch #1594804-3: Menu language Undefined when it inherits language from node solves the language set to undefined but all the menu links are still displayed.

webmestre’s picture

Same problem

wqmeng’s picture

Same problem

Spruitje’s picture

Same problem.

But simply cannot believe this issue affects this few people?!

Menu's built with Menu Block Module are working fine, it only affects Drupal Menu's.

Subscribe.

Spruitje’s picture

Found the solution which turned out to be quite simple...

I edited the menu and set the following Multilingual option: (it was set to 'no multilingual options' out of the blue!)

==> Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized.

jschrab’s picture

@Spruitje: Actually, that's not what I have found - Menu Block module generated menus show all language links in a book instead of filtering down to "current language".

Jose Reyero’s picture

Status: Active » Closed (works as designed)

Please read the release notes.

Language selection is not using node access anymore for menu items.

rondev’s picture

Category: bug » support
Status: Closed (works as designed) » Active

I tried to read the release note before posting my issue but as I don't understand the tenth of it I didn't spent more time on it. With my level, I don't see any reference to your sentence in it nor my specific issue. I don't understand what concept "Language selection" is nor "node access" means exactly.

Then my question, is it possible now with i18n to have translated menu items in the main menu for a Bartik theme? Does someone manage to do it?

If it not possible nor a wanted feature, we can close the discussion.

mesr01’s picture

I read the release notes. It is indeed said that there is a change in language selection but I did not find any clue about an upgrade path for making menus built with v7.x-1.5 work with 1.6. What is the recommended fix? Should I now create separate menus for language selection, or is there a new way to filter menu items based on current language? Thanks.

damtoul’s picture

Hello,

I got the same problem but I found a workaround for newbies programmers like me. Everything could be corrected in the GUI.

----

Go to Configuration/Multilingual settings then to Variables tab. In menu settings, check select source for main and secondary links.

Go to Menus and add a menu for each languages you have (English Menu, French Menu, etc...).
In Menus go to Settings tab. You can now at the top of the window choose the language, and then choose the right main menu associated to this language.
* This choice won't appear if the variables are not previously selected. *

Ex : English=>English menu for the source for the main links.

----

I hope I'm clear in my explanations.

Kind regards,
Damien.

rondev’s picture

Status: Active » Closed (fixed)

Yes clear, thank you.
It solved my issue. I set a "fixed language" for each menu but we can let them as "No multilingual options" as language is defined later in variables.
I just noticed a strange behavior. After the menu association for each language, I had to edit each menus again and save them to the site displays them.
I will now update my production site.

mesr01’s picture

Status: Closed (fixed) » Active

I'm reopening this request since a simple "Please read the release notes." is not exactly what I would call "support" (unless there is clear answers in the release notes, which I still cannot find to this day). I simply cannot understand how a module as important as i18n can let users down like this with so few explanation and without an official upgrade path. Having to create new menus with fixed language for every menus in every sites I ever built with Drupal 7 is, to say the least, a real show stopper. I don't believe that this is actually a scalable solution.

Besides, can somebody explains why, out of a sudden, menu visibility cannot be handled automatically any more when menu items still carry a language tag? Why give the option to "Translate and localize" in the first place if this has no effect on visibility?

Jose Reyero’s picture

@mesr01,

I'm reopening this request since a simple "Please read the release notes." is not exactly what I would call "support" (unless there is clear answers in the release notes, which I still cannot find to this day). I simply cannot understand how a module as important as i18n can let users down like this...

Feel free to reopen, complain, whatever.... just fyi I won't be following this issue anymore. I love this 'Unfollow' button.

And by the way, the solution to your problem is here: how to get real and serious support for your Drupal issues"

Have a nice day.

rondev’s picture

I didn't notice it the first time I check my site but I had the same issue in menu display though a Panel.
What I done to make the site working well again:
- create a menu per language.
- add the menus of each language in the panel.
- control the visibility of each with visibility rules of user language.
I didn't find a better solution. Could be some work for a many languages site.

mesr01’s picture

@Jose ReyeroHey: Hey, just asking for some simple and complete information here since the release notes are very shallow on the topic. Never asked to debug my code. Please provide basic information to the community, for the same reason I/we contribute patches and new features:

  • Why exactly did that change?
  • What is the recommended upgrade path?

I understand that a lot of people solved the issue by creating new menus with fixed language, but this is not a very practicable solution for when have dozens of sites to upgrade.

Aeolun’s picture

@mesr01: +1

This is a problem that needs to be addressed. How can you go change out core functionality without a decent way to convert from the previous situation?

The functionality of your website will potentially breaks if you do this upgrade, and that is something that (in my humble opinion) should never happen.

@Jose: Saying you will not follow this issue anymore because you (for some reason) dislike what is written (without providing a solution) doesn't exactly give me a good impression of drupal developers.

Thank you.

wqmeng’s picture

For anybody that use Superfish module you will need this patch to get superfish to display the correct menu after you have changed to translate menus to be fixed language from #16.

#1689228: Get superfish to show the correct menu since the i18n_menu module now only use variable translate.

webmaster-eddie’s picture

Version: 7.x-1.6 » 7.x-1.7

Request for clarification as to how i18n is suppossed to be used for multilingual D7 sites with a "Main Menu" that is Primary Links, in which each menu item must be translated (and, of course, only the menu tabs (items) in the page's correct language will display). Would someone who really understands this new way of building multilingual menus please answer the following question:

Is the new correct way to use i18n the following:

1) In /admin/structure/menu use the existing "Main Menu" for one language's (let's say English for this example) main menu principal links tabs or menu items only, and set it up as a "Fixed Language. Menu items will have a global language and they will only show up for pages in that language." menu, and only add menu items or links in English

2) To add a French main menu for primary links, in /admin/structure/menu Add a new menu, call it, for example "Menu Principal", and set that as a "Fixed Language. Menu items will have a global language and they will only show up for pages in that language." menu, and only add menu items or links in French

3) repeat for each additional language.

Thus there will be no Translation sets which equate the English "Home" menu item with the French "Accueil" menu item. Is that right, and there will be no way that the D7 system understands that the French "Menu Principal" corresponds to the English language "Main Menu"?

I just want confirmation that this is the new suggested and recommended approach to building multilingual sites with i18n, please.

Please let me know, kindly, if this is not the new recommended way to do this. I seem to have a problem understanding some of the wording and language surrounding this issue.

Thank you very much.

webmaster-eddie’s picture

Category: support » task
Status: Active » Fixed

Posted by Jose Reyero on July 19, 2012 at 10:37am

Download http://drupal.org/project/i18n_contrib

And enable the module 'Multilingual select menu filter'.

The above worked for me on the display of main menu primary links using marinelli. The module is only to provide backwards compatibility. Would love to know the best practice suggested way to create multilingual main menu and navigation primary and secondary menu links, as I am going to test this now.

mesr01’s picture

Thanks @webmaster-eddie for the information.

I wonder why we're just left in the blue. A couple of simple sentences with the right information would probably be enough to solve this whole issue about a pretty important change in the module. I just don't understand why the maintainer(s) aren't giving explicit guidelines on this.

bachbach’s picture

sympa l'ambiance …
i'm disappointed by this attitude to !

hles’s picture

Guys, go to admin/structure/menu, "edit" a menu and you will find the multilingual options for menus if the respective i18n sub-module is enabled. Decide which setting is better according to your preference.

Frederic wbase’s picture

Thanks to webmaster-eddie!

Gabo11’s picture

Thanks a lot webmaster-eddie!!!

Problem solved!

But i really have to say that i find the i18n upgrade a bit improper in relation to menu links associated to a node!

kamenrs’s picture

Thanks to webmaster-eddie for helping us cope with this problem.

Feel free to reopen, complain, whatever.... just fyi I won't be following this issue anymore. I love this 'Unfollow' button.

I feel very, very disappointed by the attitude of the module maintainer. I think that such a behavior is what really ruins the foundations of the Drupal community and repels people from Drupal. As far as I know, lots of effort are put in making Drupal easy to use, user friendly and attractive, but this kind of "support" for such an important and no-alternative module, can make every average user to reject Drupal.
Shame ...

mediameriquat’s picture

#11 solved it for me. Thank you Spruitje, it was quite simple indeed.

Btw I have only one "Main menu" for all the installed languages (no translation sets), and my menu items were created through the node edit form.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Jose Reyero’s picture

Next release (7.x-1.8) should fix all these menu issues, see #1693074: Change menu translation approach (i18n_menu_translated_menu_link_alter() skips item subtree processing)

Please test it why it's still in dev...

kenorb’s picture

Version: 7.x-1.7 » 7.x-1.8
Category: task » bug
Status: Closed (fixed) » Active

Tested 1.8, #11 and #34 patch, but it still doesn't work.
I'm Main Menu with nodes which has mixed languages, and these with different language are not hidden.

As workaround, the following module worked:
http://drupal.org/project/i18n_contrib
(Multilingual select menu filter)

mvc’s picture

Mod74’s picture

Yeah, this still doesn't work in 1.8

VVVi’s picture

Issue summary: View changes

After update from 1.5 to 1.13 this stopped working. For fix is needed:

  1. as say in #11 - enable "Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized." in the menu setting;
  2. re-save the menu items.
NSp’s picture

Drupal 7.53, i18n 1.15 — facing with same issue: just enabled internationalization for local language website, translated everything except nodes to English, then I've changed menu setting to "Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized." and then I see this behavior:

- All menu items shown for both Local and English languages
- In menu I can see Undefined language inherited from Local language nodes
- If I save Local node manually unchanged, then it disappear from the menu and menu item language become Local
- If I save Local node using VBO or just change language in the "menu_links" table in database — nothing happened (in second case menu item language become Local, but menu item still shown for both languages)
- If I create translated English node for the Local node and then add it to the menu, it has shown only for English language

How can I resave many nodes if it didn't work with VBO (node_save($entity))?