Wednesday, October 6, 2010

Multilingual Taxonomy

The Taxonomy translation module (part of the Internationalization package) provides multiple options to translate taxonomy vocabularies and terms. For each vocabulary you'll have to choose one of four different modes defining 'multilingual' behaviors for the vocabulary:
  1. None. No multilingual options for this vocabulary (default)
  2. Localize terms. Terms are common for all languages but their name and description may be localized.
  3. Per language terms. Different terms will be allowed for each language and they can be translated.
  4. Set language to vocabulary. The vocabulary will have a global language and it will only show up for pages in that language.
When a language is set for a vocabulary or term, only those that match the the current language will appear in taxonomy listings and when creating and editing nodes. If the language is set for a vocabulary, all the terms in that vocabulary will be automatically set to that language.

Per language terms

Creating terms with language is simple with the internationalization package. For example, we created the vocabulary 'colours,' which has no language assigned to it, thus allowing terms in multiple languages within the same vocabulary.

Figure 1: Creating a vocabulary that will allow multiple language terms within it.
Creating multilingual terms
Figure 2: Creating a taxonomy term with English language.
Then we created the terms 'red', 'green', and 'blue' in English and 'rojo', 'verde', and 'azul' in Spanish. If we go to the 'Translation' tab and click on Add translation, we can choose a term for each language that will be part of this translation.
Translating terms
Figure 3: Creating term translations.
If we repeat this process for the three terms, we can see all the translations in the Translation tab
Term translation tab
Figure 4: Term translations.
Once we have terms and translations, only the correct terms for each language will show up while browsing the site. When we are editing a node, the terms for that node's language will be available.


1 comment:

  1. I have found your blog to be quite useful. Keep updating your blog with valuable information...

    Multilingual web sites

    ReplyDelete