Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I use the Internationalisation module to translate menu items.
When using Menu Block, all menu items are shown on the right language section of my site.
The menu items that link to the page show up on all language sections.
So "Home" (EN section) and "Accueil" (FR section) both show up on each others section. Their languages are correctly configured.
Comment | File | Size | Author |
---|---|---|---|
#9 | menu_block-328238-9-i18nmenu.patch | 658 bytes | JohnAlbin |
#5 | i18n_menu_block.patch | 923 bytes | gorbeia |
Comments
Comment #1
gorbeia CreditAttribution: gorbeia commentedThis happens when the content the menu entry is pointing to has no defined language. For example an external link or the frontpage. The attached patch works for me. Apply it against menu_block.module.
Comment #2
sunNo patch attached.
Comment #3
TD540 CreditAttribution: TD540 commentedI was gonna say the same thing.
Comment #4
gorbeia CreditAttribution: gorbeia commentedSorry, forgot to attach.
Comment #5
gorbeia CreditAttribution: gorbeia commentedComment #6
TD540 CreditAttribution: TD540 commentedPatched perfectly. Thanx bro.
Comment #7
TD540 CreditAttribution: TD540 commentedHmm,
Something must be wrong with the patch. There's a menu block that's not showing up. There were 2 menu blocks I created out of the Primary Links Menu, the first Primary links (levels 1-2), and second Primary links (expanded levels 3+).
The second one is not showing up.
Comment #8
JohnAlbin@tdskate: the block you set as “Primary links (expanded levels 3+)” will only show its contents when you are on a page that is a secondary level link of the Primary links menu. That is how the unpatched Menu block module works. So its not the patch that is causing this expected behavior.
Comment #9
JohnAlbinThanks for the patch, gorbeia!
I re-rolled the patch and moved the call to
i18nmenu_localize_tree($tree)
down a few lines. We don't need to translate menu items that are about to be trimmed out of the tree.Since I don't have i18nmenu, please review.
Comment #10
JohnAlbinFixed. http://drupal.org/cvs?commit=155890
Comment #12
najibx CreditAttribution: najibx commentedwhen first creating "menu block", the language options is not available.
Only after block is created and then click configure, you'll see the option and it work accordingly.
It this how it should be?
Comment #13
dddave CreditAttribution: dddave commentedyes