Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When viewing translated taxonomy terms (with the help of i18n and i18n multilangual taxonomy), they are always shown in the page default language. This does not happen when using Garland as theme, but works as expected.
How to reproduce:
- Drupal with Taxonomy translation module, Synchronize translations module and their dependencies enabled
- Set up a second language
- Add taxonomy vocabulary (admin/content/taxonomy/add/vocabulary) with setting
Localize terms. Terms are common for all languages, but their name and description may be localized.
for blog content type - Create a blog entry
- Assign taxonomy term "termA" to blog entry
- Translate blog entry to the second available language. Taxonomy term "termA" will be already set
- Translate taxonomy term "termA" to "termB"
- Switch page to secondary language and open the blog entry.:
- Garland theme shows taxonomy term "termB"
- Zero Point theme shows "termA"
Comments
Comment #1
alexbk66- CreditAttribution: alexbk66- commentedThis issue is open for two years now, no progress?
The name of the taxonomy isn't translated either.
Problem is in themes' template.php lines 440 - 445
Here's my fix:
Line 441: i18nstrings("taxonomy:term:$term->tid:name", $term->name)
Should really check if(function_exists('i18nstrings')), otherwise will get an error if i18n module is disabled
Line 445: t($vocabulary->name)
Comment #2
Florian CreditAttribution: Florian commented