Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Ahmed Mohammed 1 year, 5 months ago.

Author Posts
July 19, 2023 at 2:57 pm #14067195

xiaoweiX

Given an taxonomy ID, how can I get its translation in specific language programmatically with WPML API?

July 19, 2023 at 6:52 pm #14068439

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi there,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or if I can help with the issue quickly.

To obtain the translated ID based on the taxonomy ID in any active language on your website, you can use the wpml_object_id hook as explained here: https://wpml.org/wpml-hook/wpml_object_id/.

Hope that helps 🙂

July 20, 2023 at 5:00 am #14069115

xiaoweiX

In my case using the wpml_single_string_translation is enough. Thanks anyways.