I have already searched all of drupal.org, as weel as Reyeros site, and google, trying to find a patch so taxonomy_menu works with i18n (or the other way around).
The problem is: when changing languages from i18n block, while displying a taxonomy_menu page for a term in one language, does not bring the taxonomy_menu page for the translated term.
Instead, the same taxonomy_menu page is called, but because its terms ID are for the prior language and not the language just selected, no content is displayed and a message is displayed.
When the normal taxonomy/term pages are used, the i18n block processes the taxonomy/term/xx url and the link in the block is for the translated taxonomy/term/yy page. It seems that the block is aware of taxonomy/term/xx->yy, but this processing in the block does not occur for taxonomy_menu.
I noticed that taxonomy_menu uses a different syntax than taxonomy/term (/aa/bb/cc instead of just cc) and because of this complexity I could not make any progress in my attempt to patch i18n block. (If the syntax was similar, this could be done with an extra "if .... /taxonomy/term/id else ..../taxonomy_menu/id")
I have tried a workaround with alt urls. For example:
These are the two taxonomy_menu pages that needed to be switched through i18n block:
pt/taxonomy_menu/5/28 (term in Portuguese)
en/taxonomy_menu/5/25 (same term but in English)
i18n block tries to switch languages as follows:
if showing in Portuguese, i18n tries to switch to English as:
pt/taxonomy_menu/5/28 -> en/taxonomy_menu/5/28 (should be .../5/25)
if showing in English, i18n tries to switch to Portguese with:
en/taxonomy_menu/5/25 -> pt/taxonomy_menu/5/25 (should be .../5/28)
So I created these two alt ulrs to work as hooks:
en/taxonomy_menu/5/28 -> en/taxonomy_menu/5/25
pt/taxonomy_menu/5/25 -> pt/taxonomy_menu/5/28
But these won't do the job, because alt urls module does not seem to detect the "en/..." and "pt/..." in the begining of the urls, so the above are never redirected.
BTW, I am using Drupal 4.5.6.
Thanks a lot again for the i18n solution! And thanks again, in advance, hoping you can help us with this issue....
Best regards from Rio de Janeiro!
Comments
Comment #1
sungkhum commentedHas anyone had any time to work on a solution for this? I am having the same problem.
Thanks!
-Nathan
http://www.sbbic.org/drupal-4.7.0/
Comment #2
milksamsa commentedYessss! I made it!
I had to link an item menu called "Notizie" or "News" to the taxonomy term "it/taxonomy/term/6" and in it's english version to "en/taxonomy/term/7"
I created 2 vocabularies, one called "Notizie", set to Italian and another one called "News", set as English
I added 1 term under "Notizie", called "Notizie", set as Italian. This originated "taxonomy/term/6"
I added 1 term under "News", called "News", set as English. This originated "taxonomy/term/7"
I created the menu item "News and announcements" and made it point to the url "news"
I translated the menu item with the excellent Menu Translations by Bodo Maas (It could be easily done with Manage Strings under Locale though) to italian "News e comunicati".
I created two URL aliases:
1) System: en/taxonomy/term/7 will be aliased as en/news
2) System: it/taxonomy/term/6 will be aliased as it/news
It works like a charm! Now I have a single menu, with a single menu item being translated in two languages which points to 2 different taxonomy terms.
Milk.
Comment #3
juanfe commentedHere's one possible workaround with a patch I suggested. There's still a debate on method, but it's working for me. Would be interested to see what others have to say.
http://drupal.org/node/108070
-jfr