2

I have a vocabulary which has the option Localize. Terms are common for all languages, but their name and description may be localized. set for its multilingual settings.

I have 2 languages on the site. One is English and 2nd is Dutch. I have a term name English term and its translation in dutch is Dutch term.

So is it possible programmatically to get the original term name (English term) from the translated term name (Dutch term) without knowing the tid?

In the question "How to get the translated term name by tid?" the tid is known but here I mentioned that without knowing the tid. So this is a different question.

Any suggestions?

  • in that ticket the tid is know. And here I mentioned that without knowing the tid. so its not a duplicate. – Ahmad Jun 23 '16 at 11:52
  • Each term (whether translated or not) should have its own Term ID. You just need to use the taxonomy and i18n api to get it: $term_name = 'Dutch term'; $term = taxonomy_get_term_by_name($term_name); $default_lang = i18n_string_source_language(); $en_term_tid = i18n_taxonomy_translation_term_tid($term->tid, $default_lang); $en_term = taxonomy_term_load($en_term_tid); – Beebee Jul 1 '16 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.