Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal : how to change current language of taxonomy

I have a Drupal site in English which has content i.e. nodes & taxonomy in English. Now I want to convert all content to Spanish. I want to retain the English content as well.

For taxonomy translation, I installed Locale and i18n module. I searched all taxonomy and added their Spanish translation. However, when I switch the default language of site to Spanish, the taxonomy continue to show up in English.

Any ideas or suggestion?

like image 785
Loveleen Kaur Avatar asked Dec 31 '10 06:12

Loveleen Kaur


1 Answers

To translate taxonomy terms you should use the Taxonomy translation module (part of the Internationalization package). There are three translation mode for taxonony vocabularies and their terms. If you want to keep the same terms but translate their titles (and description), you should set your vocabulary mode to Localize terms. When doing this, enter each term in the site default language (probably Egnlish in your case). Then, using the translate strings interface, you can provide translations.

Check the Multilingual Taxonomy handbook page for more information.

The Taxonomy translation module should handle standard term displays so they will use translations. If you need to retrieve a term's name and description for output in some custom code, you will have to use i18ntaxonomy_localize_terms to get the translations. Passing the term's name or description to l() won't work.

like image 134
Pierre Buyle Avatar answered Oct 25 '22 02:10

Pierre Buyle