Hello!

I am building a Navigation-Block of all taxonomy terms in a vocabulary to be used for navigation as follows:

<?php
$vid = 1;
$terms = taxonomy_get_children(0, $vid);
if (count($terms)) {
echo "

';
}

(http://noradreissigacker.com/en/works)

This works fine, but I am unable to show the translation of the terms when I change the language. I have tried to do it with t($term->name) but this does not work.
I have also tried the Taxonomy Navigator Module but encounter the same problem there.

Translation mode of the vocabulary is ' Localize terms. Terms are common for all languages, but their name and description may be localized.'

Can someone tell me how this is done?

Thanx

Comments

cybernomad’s picture

I managed to translate the terms like this

...
$translation = tt('taxonomy:term:'. $term->tid .':name', $term->name);
echo "

  • tid . "' " . $activeMenu . ">". $translation . "";
    .....

    Case closed (unless someone has a better solution)

  • kars-t’s picture

    Status: Active » Fixed

    Hi

    I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

    Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

    Status: Fixed » Closed (fixed)

    Automatically closed -- issue fixed for 2 weeks with no activity.