Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to import Italian product translations into their site, which already contains products in the main language, German. They have a CSV file with the Italian translations, including columns for SKU, name, short description, and description.

Solution:
Here are the steps to follow:

  1. Export your default language content using WP All Export.
  2. Edit the exported CSV to add a column for the unique identifier.
  3. Delete the original content from the site.
  4. Import the default language CSV file with the unique identifier column as New items.
  5. After importing the default language content, proceed with importing your secondary language file.

For detailed instructions, please refer to our documentation on Importing Multiple Languages with WP All Import and WPML.

If you need to connect translations programmatically, you can use the

wpml_set_element_language_details

hook. However, we do not provide custom coding services. For examples and explanations, check out our documentation on wpml_set_element_language_details and related support forum discussions. If you require further assistance with custom coding, consider hiring a professional from our list of WPML contractors.

Please note that this solution might be outdated or not applicable to your case. If the provided solution does not resolve your issue, we highly 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 help, please open a new support ticket in our support forum.

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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Dražen Duvnjak 1 month, 3 weeks ago.

Assisted by: Dražen Duvnjak.

Author Posts
February 19, 2024 at 1:44 am #15315751

Maximilian Wellner

I want to import product translations to my site using your new import plugin.
My products are on the site in main language german, and no product translations are on the site.

I have a csv with the italian product translations of the products, with columns SKU, name, short description and description

How can I import these now to my site?

follow up to https://wpml.org/forums/topic/wpml-all-import-help/page/2/#post-15256618

February 20, 2024 at 8:44 am #15320934

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

I am afraid that is not possible, you would need to export and then import products in both languages for them to be connected correctly.

- https://wpml.org/documentation/related-projects/wpml-export-and-import/

For your case I would advise using WP All Export and WP All Import and follow the procedure from our docs, you do not need WPML Import export in that case:

- https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/importing-multiple-languages-with-wp-all-import-and-wpml/#adding-translations-when-the-default-language-content-already-exists-on-the-site

To add translations when default language content already exists on the site:

- Export your default language content using WP All Export.
- Edit the newly created CSV to add a column for the unique identifier.
- Delete the original content from the site.
- Import the default language CSV file with the unique identifier column. Make sure to import it as New items.
- Once the default language file has been imported, you can continue with your secondary language file as previously explained.

Regards,
Drazen

February 20, 2024 at 10:59 am #15321985

Maximilian Wellner

- Delete the original content from the site.

I can't delete them, they are 30000+ products with many meta fields.

I just want to simply add translations of the original products.

February 20, 2024 at 12:00 pm #15322482

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

I understand, but I am afraid there is no easy way to import translation to already existing content. One way would be translating them manually or via automatic translation:

- https://wpml.org/documentation/getting-started-guide/

Or coming up with a custom solution and connecting them as translation via the next hook:

- https://wpml.org/wpml-hook/wpml_set_element_language_details/

Regards,
Drazen

February 21, 2024 at 5:52 pm #15329892

Maximilian Wellner

but what about the solution mentioned in my linked thread?

what is the easiest solution?

February 22, 2024 at 8:31 am #15331626

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

you could import a product in 2nd language like that, but still, it will not be connected as a translation with your default language. You would have a product in the default language and a product in 2nd language, and still would need to connect them manually or via our hook.

I am afraid there is no other way than the one I already suggested above.

Regards,
Drazen

February 25, 2024 at 4:13 pm #15341593

Maximilian Wellner

so what if I export my products with the woocommerce export tool, replace the title, short desc, and description columns with the translation data and import them back with the extra columns needed for the wpml import export plugin? Would that work?

Do I need to export/ import all product data for this to work or is title, short desc and desc columns enough?

February 26, 2024 at 7:38 am #15342441

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

you can export only title/content, but it still won't work as far as I know, since you need to have an import in the default language also for it to work correctly and connect translation correctly.

So it needs default language import, 2nd language import, and connection field/key for it to work. From my perspective, the best would be to connect them via our hook, suggested above, after you have imported 2nd language product.

Regards,
Drazen

February 26, 2024 at 1:49 pm #15344558

Maximilian Wellner

how would it work with your hook? Can you guide me pls?

February 26, 2024 at 2:01 pm #15344619

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

I would advise checking shared documentation there is examples and explanations of each section:

- https://wpml.org/wpml-hook/wpml_set_element_language_details/

In short, you should get both posts IDs and then connect them via hook/code.

There are also some examples on the support forum from other clients, but as said we can not support or provide custom codes.

- https://wpml.org/forums/topic/use-of-wpml_set_element_language_details-to-programmatically-sync-custom-posts/

Since we can not provide custom coding service if you need further help with this you can hire WPML contractors:
- https://wpml.org/contractors/

Hope this helps.

Regards,
Drazen

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.