Summary:
When I use the translation table to edit the English menu 'string' for a Primary Menu item, the menu item displayed is not changed.
Steps to reproduce:
0- My site is multilingual English/Japanese (http://www.cachekuni.com/drupal/)
1- I have a home page with the 'Menu link title: ' set to 'Home'
2- I go to the Translation Table | Menu
3- I see my menu items listed as follows:
Original English Japanese Operations
About Us About Us アバウト Edit source Translate Delete string
Home Home ホーム Edit source Translate Delete string
4- I change the English for Home to 'Home Page' and click the save button
5- The page reloads but the menu on my web page still shows a link with the string 'Home' and not 'Home Page' as expected. The translation table shows the change however:
Original English Japanese Operations
About Us About Us アバウト Edit source Translate Delete string
Home Home Page ホーム Edit source Translate Delete string
I tried refreshing and clearing the caches but that had no effect.
Attached screen shot.
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot.png | 67.81 KB | Anonymous (not verified) |
Comments
Comment #1
jenifertucker commentedI too am having the same problem. I have created 6 primary links and works OK in English version of site, but when switching to Italian version, 5 of the English tabs are displayed. The only one that changed was "Contact" swapping to "Contatto".
Development site:
http://italydev.stanleywindrush.org.uk/en
Swap to Italian version to see the problem.
All the menu items in the primary links has language set to "All languages" following the line below the dropdown box:
"Language:
Select a language for this menu item. Choose "All languages" to make the menu item translatable into different languages."
The config file has the relevant line uncommented.
$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
// 'site_name',
'site_slogan',
'site_mission',
'site_footer',
// 'anonymous',
// Different front page for each language
'site_frontpage',
// Primary and secondary links
'menu_primary_links_source',
'menu_secondary_links_source',
// Contact form information
'contact_form_information',
);
Using the translation table (.../build/translate/table/menu) I tried to set up one to see if it worked:
Original English Italian Operations
Adopt a donkey Adopt a donkey Adotta un asino
Adotta un asino Adopt a donkey Adotta un asino
Still it does not work.
Any ideas?
Comment #2
pasqualle@totsubo: translation of default language does not work. you need to create a new English language to be able to change English strings. #636126: Why does the original language also show up as it's own translatable column in the translation table?
@JeniferTucker: you do not need menu translation to translate the primary menu.
http://drupal.org/node/313302
you should have different English and Italian primary menu
Comment #3
jenifertucker commented@Pasqualle:you should have different English and Italian primary menu
Have checked the settings and they look OK.
English settings:
Source for the primary links:
Primary links
Select what should be displayed as the primary links. This is a multilingual variable.
Switch language while on ...en/admin/build/menu/settings and it is set to:
Sorgente dei links primari:
Primary links
Selezionare quello che dovrebbe essere visualizzato come link primario. This is a multilingual variable.
All the primary links have their language set to "All languages" as the help text underneath suggested.
Still doesn't work :-(
Comment #4
pasqualleSource for the primary links:
Primary links
Sorgente dei links primari:
Primary links
the items marked with bold needs to be different
Comment #5
jenifertucker commentedProblem fixed, thanks.
Created 2 new menu items (not using primary links to add items to). Once called "English navigation" the other called "Italian navigation". Then changed the source for the primary links (/en/admin/build/menu/settings) to be "English navigation".
Used language switch while on the menu settings page and changed source of primary links (/admin/build/menu/settings) to be "Italian navigaton".
Thanks for your help.
Comment #6
Anonymous (not verified) commented@Pasqualle: translation of default language does not work.
Understood. Any chance this can be fixed? It would be great is Translation tables can be used to change both the translation text *and* the original English also. If not, I agree that the original language column should be removed as it is confusing, or at least make it a disabled field.
Comment #7
pasqualle@totsubo: it is a limitation of i18n. I guess the reason why it is not implemented, because you can not change the default texts in Drupal, so it would not make sense to allow it only for dynamic texts with i18n..
Comment #8
jenifertucker commentedHaving received an email from a fellow Drupler asking how I fixed this problem with my own website, here's what I put together (thanks d.paolino for checking this worked for you too).
----------------------------------------------------------------------
Neither the primary links or secondary links work for a multilanguage site.
Make sure the config file has the i18n_variables array uncommented for:
// Primary and secondary links
'menu_primary_links_source',
'menu_secondary_links_source',
I got round it by creating new menus:
Administer / Site building / Menus
1. English navigation
2. Italian navigation
I then added the English menu items I wanted for the English version of the site:
Administer / Site building / Menus / English navigation
Menu item Enabled Expanded Operations
About us edit delete
How to find us edit delete
Helping donkeys edit delete
Donkey rescues edit delete
Donkey welfare edit delete
Donkey therapy edit delete
Education edit delete
etc, etc.
And did the same for the Italian version:
Administer / Site building / Menus / Italian navigation
Menu item Enabled Expanded Operations
Chi siamo edit delete
Come arrivare edit delete
Cosa facciamo edit delete
Asini salvati edit delete
Benessere edit delete
Onoterapia edit delete
Didattica edit delete
etc, etc.
Finally, I then went into the menu settings (admin/build/menu/settings)
and while viewing the site in English, set the source for the primary links.
Source for the primary links:
Select what should be displayed as the primary links. This is a multilingual variable.
and saved the configuration.
While still on the page (admin/building/menu/settings), I swapped language to Italian
Sorgente dei links primari:
Selezionare quello che dovrebbe essere visualizzato come link primario. This is a multilingual variable.
and again saved the configuration.
One thing I noticed (don't know if the problem was there before I was having trouble with primary links, but my breadcrumbs disappeared. A nifty module called "Menu breadcrumb" solved that problem :-)
Comment #9
Anonymous (not verified) commentedJennifer I don't mean to sound rude but this is a bug report page.
I can't speak for this maintainer but if this were my module I would ask that people only post information that directly relates to the bug report by giving more information so the developer can fix the problem. That's just me though :)
Comment #10
pasquallehttp://drupal.org/getting-involved
the issue queue is open for everyone. Any kind of help is greatly appreciated.
Never wait for the maintainer to fix the issue for you when you feel like you can help others with writing down the solution which worked for you or answering a question in the issue or even fixing the problem with submitting a patch or proposing a solution.
Comment #11
jenifertucker commentedSorry totsubo...
It was originally in reply to "Primary link menu translation not working - help please" and the way I fixed it.
So far I have yet to get the translation table to work whatever solution I try to get things to display properly.
Jenifer :-(
Comment #12
kewlguy commentedThis on has confused me for some time.
I actually have my primary menu (On one menu) working with exception of the 'contact' link the damn thing always displays links in both languages even with the alternative contact module installed, which by the way ads the translatable t () to the contact page fields.
I believe there is an easier solution for menu's that follows the i18n for nodes and I have made a post here
It is my opinion that the menu_links table needs to have a few columns added in for "language" and "tnid" as well as the language table to have a couple more rows that would relate the menu items between the languages in the exact same fashion as the nodes are related in the 'formula' column. This is how it is done for nodes and it seems to work well even with the content translation.
Please post your thoughts on this approach in the i18n issues on this post here
I honestly believe that the above change would solve most of the problems with i18n and menus as well as I feel this would add HUGELY to the usability of drupal as a global software. Post here if you think I am right or wrong
I am so sorry, that I do not possess the skills to create the module myself.
Comment #13
webel commented@totsubo
I can't think of anything more relevant to readers than Jennifer's description, which at least provides a decent workaround. If a user searches for topics that hit this issue subject, it is ideal to have at least input describing what works, and this also aids in diagnosis of and understanding of the issue. She also states exactly what does not work.
> That's just me though :)
I think it is. Your post is not relevant to the issue, Jennifer's is.
Comment #14
webel commentedw.r.t. workaround described by JeniferTucker at: http://drupal.org/node/633798#comment-2361404
#774274: Choosing language-dependent source for primary links not taking at menu admin settings for different languages
Comment #15
jenifertucker commentedThanks webel for the vote of confidence!
Drupal can be quite frustrating when things don't work as you expect and having already spent a lot of time looking for tutorials, other comments in the forums, this was my last ditch attempt to try and resolve. I'm not one of those who just posts without trying to solve myself. I wasn't aware it was a bug - more the problem being me not using the module correctly. So thanks again.
Comment #16
jose reyero commentedI think the steps in #8 should work though that's also documented here, http://drupal.org/node/133977
Feel free to add to the documentation, maybe this is a better explanation.