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 Laura 11 months, 4 weeks ago.

Author Posts
May 6, 2024 at 12:31 pm #15597298

mehmetU-4

Hello Dear WPML Support Team,

I am currently using WPML on my e-commerce site, which features a large inventory of over 4000 products primarily described in English. I have recently integrated Arabic as a new language option and am seeking to automate the translation process for these products using a translation API.

I would like to ensure that after translating the products, they are properly linked within WPML, maintaining their relationships and statuses accurately across languages. Here are some specific questions I have:

What is the recommended method to programmatically add a translated product in WPML and link it to its original version? I need to ensure that metadata and custom fields are also translated and linked properly.
Is there an API or a particular set of WPML functions that you recommend for handling the translation of post titles, descriptions, and syncing metadata between the original and translated posts?
Are there any specific considerations or best practices I should follow when using external translation APIs in conjunction with WPML to ensure consistency and integrity across the translated content?
I am looking for guidance or reference to any documentation that might help in setting up this automated translation process more efficiently.

Thank you for your assistance in advance. I look forward to your recommendations and any resources you can provide.

Best regards,
Mehmet

May 6, 2024 at 4:47 pm #15598743

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

We don't have a specific recommended workflow to translate programmatically.
You can check the documentation about hidden link API">https://wpml.org/documentation/support/wpml-coding-api/ where you should find everything.

About WooCommerce, WCML uses REST API. You can check our WooCommerce-specific hooks here

May 9, 2024 at 7:29 am #15608958

mehmetU-4

Hello Laura,

This information was very helpful, and I managed to perform translations using the OpenAI API! Thank you very much.

I hope WPML will also integrate with the OpenAI API. As you can imagine, the translations are of much higher quality!

Best regards,
Mehmet