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.
If taxonomy_menu could accept multi-term syntax, like the original (taxonomy/term/xx+yy+zz), maybe the following alt urls would do the job?
taxonomy_menu/5/28 -> taxonomy_menu/5/25+28
taxonomy_menu/5/25 -> taxonomy_menu/5/25+28
(i.e.: we can select the terms for both languages, and only the terms in the selected language show up)
BTW, we are using Drupal 4.6.5.
Best regards from Rio de Janeiro!
Comments
Comment #1
asiafan commentedare u using the language switcher or the translations block to switch?
Comment #2
brmassa commentedGuys,
im a new maintainer and i just launched the new version of the module. it now has this feature.
regards,
massa
Comment #3
suoko commentedIt doesn't seem fixed yet.
I'm now creating a site with multilanguage support and a hierarchy menu.
I created a category (an terms) all with "english language" selected.
Then I translated terms through localization module.
Now when I switch from one english to italian the taxonomy menu disappears.
However I have problems with node translations too.
Since english node is different from italian node (it's a duplicate), when I choose a parent menu and switch the language I miss all children.
I'd need help to sort this out
Comment #4
willeaton commentedI have latest taxonomy menu and i18n, I have 1 taxonomy menu set up and when switching between English and Spanish, One of the links which appear in a menu for English is moved to "Navigation" in Spanish. I cannot hide it!