0

I have a vocabulary of taxonomy terms I get through taxonomy_term_load($tid); and displays in views page. How do I get and display the terms depending on the user's language?

1 Answer 1

0

Basing on Using the i18n API from other modules, the code should be the following one.

$term = taxonomy_term_load($tid); 
$translated = i18n_string_translate("taxonomy:term:$tid:name", $term->name);
1
  • It does not work displays all terms in both English and in Russian. Commented Dec 11, 2014 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.