Closed (cannot reproduce)
Project:
Fusion
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2011 at 13:28 UTC
Updated:
13 Feb 2013 at 14:11 UTC
It's working fine with Bartik but the problem is when I switch to fusion.
When I translate the front page I have both links in the main menu.
Title is Home - Path is <front> - Language is English
Title is Accueil - Path is <front> - Language is French
The result in Fusion is:
In the english main menu I have "Home - Accueil - About us - Contact us"
In the french main menu I have " Home - Accueil - À propos de nous - Contactez-nous"
Any idea how to get that works in Fusion?
Thank you,
Comments
Comment #1
stephthegeek commentedI haven't worked with multilingual in D7 yet, but the main difference in menus between the two is that Fusion uses a main menu region while Bartik prints it out as a variable in the template. I'm not sure why that would affect this, but it might give someone a starting point. Strange that only *one* item would be duplicated.
Are you using superfish?
Comment #2
Swebmas commentedI did not use Superfish. I have the same duplication for the "contact" page because it is not generate by cck. Only page like front, contact, forum get duplicated.
Comment #3
aquariumtap commentedI haven't been able to replicate this, exactly.
What was your method for translating a menu, Swebmas? This is my first time doing multilingual in D7, so I have to learn that before debugging the problem in Fusion.
For me in Fusion, toggling between English/French does not change the language of my "main menu" block. I'm not getting duplicates -- but I'm not seeing the switch ata ll.
In Bartik, the toggle is working as would be expected.
Comment #4
aquariumtap commentedComment #5
Swebmas commentedFirst, I'm using the module i18n 7.x-1.0-beta4. You need to activate some modules before you can activate the menu translation.
If you don't have another language yet, you add it here: admin/config/regional/language
In the configuration admin/config/regional/language/configure you can select some detections. I enabled "URL"
In the configuration admin/config/regional/i18n/variable you select "Source for the Main links".
You should now have language options in the menu. You can edit the home link and select english as language. Then to add a translation to the home you create a new link. Name it "Accueil" link is
<front>and select french as language.For the english "Home", the URL should be domaine.com/en
For the french "Accueil", the URL should be domaine.com/fr
Comment #6
pardalman commentedGot the same problem using Bluemasters theme in a testing site: D7.2+i18n-7.x-1.0-beta7.tar
Just in case it helps or anyone could give me a hint.
I have this problem not only with Home but also with Contact page.
Comment #7
pardalman commentedWORKAROUND TO SOLVE IN BLUEMASTER THEME
Just in case this code snippet helps anyone I have solved this issue by deleting manually the elements of the menu that are duplicated editing the page--front.tpl.php of the Bluemasters theme:
Comment #8
aquariumtap commentedUpgrading the i18n module to the 7.x-1.0-rc1 release should correct this issue.
Comment #9
pardalman commentedI've upgraded i18n module to 7.x-1.0-rc1 and keeps not working...
Using Bluemasters theme.
This is the part where the menu is printed on screen, any hint? (solving this would save some cpu cicles and some of my nerves when editting the file every time I change the order of my menu links)
XD
Comment #10
aquariumtap commentedHi pardalman, you should ask the maintainers of the Bluemasters theme. It isn't a subtheme of Fusion.
Comment #11
pardalman commentedDefinitely,
Sorry!
Comment #12
Asw20 commentedHello,
I have the same issue.
"Curriously" I have this issue if I use a dropdown menu like superfish with Danland or Mega Drop Down with Marinelli theme.
In the other hand if I use the standard menu I don't have a dropdown menu...
Menu items linked with a content work well, if the content is in english the menu will show up only when the language is set in english.
I still have probleme with menu related to the page or with a fonction like user/login ...
I might be wrong but for me the problem is soemwhere in the menu.inc when using menu_tree_all_data which select menu item with a wrong language code or in the i18n which should remove language code other than null ?
Comment #13
Asw20 commentedI fixed it !
The following fix did correct superfish menu and other like Mega Drop Down. My language detection setup is user , Browser, then default.
File menu.inc
function _menu_build_tree (not menu_build_tree)
Add the following condition:
$query->condition('ml.language', array(LANGUAGE_NONE, $GLOBALS['language']->language), 'IN');
here is the code of this section
// Nr001 Only look menu links with none or the current language.
$query->condition('ml.language', array(LANGUAGE_NONE, $GLOBALS['language']->language), 'IN');
Comment #14
maxxer commentedCan confirm fix in #13 seems to working in Zen subtheme, with custom menus assigned to blocks.
1st: thank you to Asw20 :)
2nd: seems odd we have to hack core here, no? Other readings suggest this really shouldn't be an issue in D7 with new(er) versions of i18n.
Comment #15
gynekolog commentedworks perfect, thank you
Comment #16
emorency commentedHave a look at that issue http://drupal.org/node/1021462 that is referring to a solution that does not require to hack drupal core:
http://drupal.org/node/1225094
- Etienne
Comment #17
themaurice commented#13 thanks Asw20 works well with superfish menu.