Search code examples
drupal-7internationalizationcontent-typedrupal-taxonomypathauto

drupal 7 taxonomy i18n is not working when editing multilingual content.I'm stock to default language


I create a taxonomy called colors. Each of my term are translatable, in french and english.

I create a content type called product where I can associate a taxonomy color. Note that my product content type is multilingual aswell

My admin default language is french.

When I create a product,the color taxonomy is only showing in french which is my admin default language. In my mind, it's supose to be displayed within the language set in the node. It's a problem right now because, english node is associated to french taxonomy.

Anybody know how can I resolve this issue.

Thanks a lot.


Solution

  • It depends on how your taxonomy was set up.

    There are three different modes, beside from no-multilingual:

    • Localize. Terms are common for all languages, but their name and description may be localized.
    • Translate. Different terms will be allowed for each language and they can be translated.
    • Fixed Language. Terms will have a global language and they will only show up for pages in that language.

    I guess colors are common for all languages, so I would recommend using the first option. You can then translate the colors via config > translate interface.

    When you chose the "localize" option you don't have duplicate colors showing up on node forms.

    Update

    If the terms are common for all languages but you want to add more fields to the terms, you could use localize and in addition use the entity translation module.

    Entity translation allows you to translate the different fields for each term.

    There are two drawbacks though:

    • On top of the entity translation you have to translate the terms via translate interface or else the terms will not be translated on the node-edit-forms.
    • You have to alter the aliases for the Terms yourself via /admin/config/search/path so the terms have different path aliases for different languages

    This is of course not a good solution for user-generated terms but works if the terms are moderated.