This thread is resolved. Here is a description of the problem and solution.
Problem:
You are developing a site and using the WooCommerce API to import categories, attributes, and products. However, you've encountered an issue where attributes can't be translated over the API, and attributes created through the API are monolingual, making their terms untranslatable. You are looking for a way to translate attribute names using a PHP script.
Solution:
Currently, it is not possible to translate attribute names through the API. You can create attributes using this guide, but to translate the attribute names, you must do it manually. Go to "WooCommerce → WooCommerce Multilingual & Multicurrency", under the Attributes tab, scroll down to the "Translations of taxonomy labels and slugs" section and add the translations there. Although this may not be the ideal solution, it is the only method available at this time. We are aware of this limitation and are hoping to include support for translating attribute labels and names in future versions of WCML.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.
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 3 replies, has 1 voice.
Last updated by 5 days, 10 hours ago.
Assisted by: Prosenjit Barman.