multilanguage internationalisation module (i18n) - taxonomy

Created by janroe

drupal internationalisation module (i18n)
http://drupal.org/project/i18n 6.x-1.1 on 6.14

Taxonomy:
My current recommendation for taxonomy is: test if translation works the way you need it to - before doing anything else. Some things might not work as you might expect from reading the description or the instructions.

My earlier recommendation on this was: Set the concept of the taxonomy structure before starting any work on this. Test the structure. Set and test the general language concept. Only set language specific taxonomy options and terms after main taxonomy principles and language principles are clear. Handbook explanations are here: http://drupal.org/node/313268.

Content management > Taxonomy
Edit vocabulary [New:] Translation mode radio buttons: None, Localize terms, Per language terms, Set language to vocabulary. Also a Language dropdown box, active only for: Set language to vocabulary (save the page first). In further detail:

  • None:
    List terms > Edit term > [New:] If vocabulary is set to None, nothing happens.
  • Localize terms
    Summary: In essence, the terms are translated while the content is in whatever language the user created it in, unless it has been translated. So if no node translation happens, the content can be mixed. But users see all contributions, regardless of language. Switching can be on user post level (if a translation exists on the post). List terms > Edit term > [New:] If vocabulary is set to Localize terms a translation string is added. Apparently (not tested myself) this makes content appear according to translated terms, regardless if content is translated or not. So, if some content is not translated, it will show up as original language in another language. This is not my intention. (Update, analysis110816: http://blog.archizone.fr/?p=437) Note 091031: there is a bug in i18n translation strings (see below)
  • Per language terms:
    Summary: In essence, "Per language terms" means that you create taxonomy terms separately for each language. Then you connect one language's term to the second language's term. This makes it possible to switch languages. When users enter content in one language, that content only shows up in the other language if it has been translated - untranslated content is not viewable in the other language.

    Step-by-step (the bug mentioned below is probably solved by now):
    => If the language is left at blank, the language definitions for each term will govern on which language pages they appear, and the selection box headings and help text will appear in the default language - these can be translated by strings translation. This allows for clean language separation, while untranslated content can't be seen in the other language. Switching can be on user post level (if a translation exists on that post).
    => In the user content pages, the taxonomy terms appear according to the language they have been defined in. In other words, only Lang A terms appear when viewing pages in Lang A. Only Lang B terms appear for Lang B. Nice!
    -> In the user content pages, the vocabulary names, that is the headings of the boxes where users choose terms, remain in default language. Also the help texts below the boxes. Those may be translatable with string translation, but there's a problem with that(see bug further below). So, this option may not be usable for my requirements of language separation.
    -> Note: After deciding to abandon the (below) Set lang by vocabulary, new vocabularies appear only on new content creation pages, not on earlier content. Also, the terms' languages appear mixed. Fixed by Site configuration > Languages > MultiLingual system: Content selection mode: Current language only. However my current vocabulary is stuck in greyed out English (not in blank language) so now it won't appear. Checking
    List terms > Edit term > [New:] If vocabulary set to Per language terms

    • List terms > Terms in [Vocabulary name], a translation tab appears Note: "You will be able to set a language for each term and create translation relationships." The translation tab does not, as it says "Create new translation". It creates a translation relationship between the terms of different languages. The relationship ensures that the language switcher will correctly switch those vocabularies to another language (without it, there is no corresponding other language content to switch to). Before setting the relationship between the terms of languages, you first need to create the terms in the other language, and assign the language to each term, here:
    • List terms > Terms in [Vocabulary name] > Operations: edit > Edit term, a language drop down box appears (for each term).

    Note: In this case the terms are translated and the translated terms are linked to each other by language: When on a term page, showing all content headings associated with that term, the language switcher block will switch to all translated content heading that belong to the corresponding translated term - instant site switch. That's great.

    But! The vocabulary name and help text apparently can't be translated. The vocabulary name is the heading for each selection box, and the help text is the supporting text below it - the strings can be translated, but they don't appear on-page, neither in core content creation (page, story etc) nor contributed modules (ed-classified)content creation - these remain in default language, whatever I do. Well. Others: http://drupal.org/node/157245 (!), http://drupal.org/node/261998, http://drupal.org/node/29697, http://drupal.org/node/555494, http://drupal.org/node/638556 - but then: http://drupal.org/node/428398 (yes how did they do that?.

  • Set language to vocabulary
    Summary: In essence, this creates an entire taxonomy in one language and another entire, possibly different taxonomy in another language. These taxonomies are not connected whatsoever. There is no relationship between them. Switching is only at the very top.

    • Taxonomy > Edit vocabulary [New:] Language drop down box: Blank, Lang A, Lang B. The language box appears after the Set language to vocabulary is selected and the page is saved.
    • Content management > Taxonomy > Vocabulary > List terms [New:] Help text: [Vocabulary name] is a vocabulary with a fixed language. All the terms in this vocabulary will have English language.
    • Content management > Taxonomy > Vocabulary > List terms > Edit term > [New:] No further options. A help text: [Language as set at the vocabulary level] All terms in this vocabulary have a fixed language:

    Note: The vocabualaries are fully separate for each language; they are not linked to each other; the main lanugage switcher will not switch to related content in another language, because no relationship is defined between the terms belonging to different languages.

This needs to be thought through properly and tested before deciding on the best solution. Problem is that i18n is buggy and the best solution might not work out.

Example: If using Per language terms, the main vocabulary items need to be translated with string translation, becausethey are not separately defined. If string translation does not work, these can't be translated - the site will, in fact have to use mixed languages (not good). A workaraound may be to use Set language to vocabulary, here we can manually define the vocabulary (headings) in languages and make the terms in languages. But the same terms of different languages won't connect to each other; when you use the main language switcher, the same other language term won't show the same other language items. Bugs described below.