I am creating a website with two languages, English (primary) and Spanish (secondary). I've installed and configured WPML to handle the multilingual aspect of the site. (I'm aware Toolset and WPML are owned by the same parent company.) Here are two questions related to translating taxonomies:
+ When displaying a Toolset view with taxonomy terms, will WordPress/WPML automatically know to display the correct language that a visitor has chosen? For example, if a visitor has chosen Spanish and they view a webpage with the taxonomy terms, I would like the terms to be in Spanish (not English).
+ Using custom PHP, how do I display a taxonomy's terms in the correct language? I think I need to use the wpml_current_language function (https://wpml.org/wpml-hook/wpml_current_language/), but how would I retrieve the translated terms? For example, if a visitor has chosen Spanish and they view a webpage with the taxonomy terms, I would like the terms to be in Spanish (not English).
Hello. Thank you for contacting the Toolset support.
+ When displaying a Toolset view with taxonomy terms, will WordPress/WPML automatically know to display the correct language that a visitor has chosen? For example, if a visitor has chosen Spanish and they view a webpage with the taxonomy terms, I would like the terms to be in Spanish (not English).
====>
Yes - that's correct.
+ Using custom PHP, how do I display a taxonomy's terms in the correct language? I think I need to use the wpml_current_language function (https://wpml.org/wpml-hook/wpml_current_language/), but how would I retrieve the translated terms? For example, if a visitor has chosen Spanish and they view a webpage with the taxonomy terms, I would like the terms to be in Spanish (not English).
====>
If you're working with a term ID and need to ensure you get the translation: