Hi - I really like this module. I'm using it on an i18n site _ and before you send me to the 130+ replies thread - I tend to use a separate menu for each language rather than the i18nmenu module. I fin it easier and less confusing for the user.
My request would be to make it possible to add taxonomy_menu_vocab_parent to the i18n_variables array and make it language dependent that way.
So what it needs is adding an ID for the vocabulary (and repeating that for all uses). I might take a look at patching it myself...

Comments

indytechcook’s picture

@miimooo, I'd be happy to commit a patch. With out research, I wouldn't know where to start (though I'm sure I'd start in the i18n documentation).

Let me know if you need help in the patch or just give me a hook or something to implement and I can write the code.

miiimooo’s picture

Thanks for offering to help. Guess what I should have looked at the code first as it seems that it is already possible because the variables get saved with the vid at the end. What I've tried is adding these two to my settings.php

$conf['i18n_variables'] = array(
...
  'taxonomy_menu_vocab_parent_2',
  'taxonomy_menu_vocab_menu_2',
);

2 is the vid of my vocabulary. Now it stores one value per language.

Then I realized that on each update the menus would get overwritten so I made some changes which basically add a language column to the taxonomy_menu table and support for setting that correctly.
Also, the term itself needed translating so there is a tiny patch to taxonomy_menu.module which might break other modes of doing i18n menus but works well for my use case.

miiimooo’s picture

Status: Active » Needs review
indytechcook’s picture

Can anybody test this?

miiimooo’s picture

It's working well here. Please note that it only supports one way of doing multi-lingual menus which is using a separate menu for each language. I think it would break i18n_menu.

agoradesign’s picture

Hi,
I have the same problem / feature wish: I'm running a D7 site with i18n and Taxonomy Menu.

The terms don't get their own menu, instead they will be placed in the 2nd level of the main menu. Their parent menu item should be "products" in English and "Produkte" in German. But unfortunately this constellation is impossible to configure.

It would be nice to either have the possibility either to select an parent menu item for each language (as described by miiiooo) or even better to automatically select the right parent menu item determined by its language with the help of the translation set.

So, after line 587 (I'm using the latest dev)
$plid = variable_get(_taxonomy_menu_build_variable('vocab_parent', $item['vid']), NULL);
In theory, we should check the existence of the necessary i18n module(s) (i18n_menu??? i18n_translation???) and get the translated menu item. Unfortunately I'm quite unsure how to establish this...

For the current project I "solved" my problem with an ugly hardcoded id-based check, but it would be nice, if there would exist a common solution...

PS: I was not sure, if I should open a new issue because of the version difference (D6 vs D7)

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu-localize_terms.patch, failed testing.

webcultist’s picture

I'm aso very interested in a solution for D7.
At the moment, I simply have no idea how I could work around this problem in my multilingual site.

dstol’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

The Drupal 6 version is no longer supported