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 7 replies, has 2 voices.

Last updated by Bruno 2 years, 2 months ago.

Assigned support staff: Bruno.

Author Posts
August 8, 2017 at 4:15 pm #1337717

Daniele

Tell us what you are trying to do?
Hi. I'm managing an e-commerce for one of my clients. After 4 years and a lot of problems we now decided to do a fresh installation of everything, It is not a big deal, because we import products with WPAllImport via XML since last two months.
Now, I want to use this occasion to reintroduce WPML into the website. So I'm asking:
- Should I do an import in main language first and then run a WPML All Import task? Or is it better to do it together from the beginning?
- Can I use a barcode which identifies every variations as ID for WPML AI?
- Regarding the fact that categories must be created in mani language and then translated before importing: products in main language creates their own categories based on certain field of the XML, so what will happen when a new product will come in into the XML and have a differente term in those fields?
- Can I use the same file? I will translate the import layout, but they cannot provide me an XML with translated terms

Is there any documentation that you are following?
This https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/

Is there a similar example that we can see?
Here you can find an example of a product in XML hidden link, categories are generated by terms in SOTTOGENERE and FORNITORE

What is the link to your site?
hidden link

Please consider that I will work with something like 2000 products with circa 5-6 variation each.

August 8, 2017 at 7:13 pm #1337849

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Thank you for contacting us.

- Should I do an import in main language first and then run a WPML All Import task? Or is it better to do it together from the beginning?

You must first run the default language and then the translations. This is because it is necessary to use "Unique ID" so you can make the relationship between the original content and the translation.

- Can I use a barcode which identifies every variations as ID for WPML AI?

Variations can be identified by an ID. This should be the easiest method to connect variations and work in the secondary language. I'll attach an image for you to see.

- Regarding the fact that categories must be created in mani language and then translated before importing: products in main language creates their own categories based on certain field of the XML, so what will happen when a new product will come in into the XML and have a differente term in those fields?

Categories are not created automatically. In these cases, the products are created without the categories.

- Can I use the same file? I will translate the import layout, but they cannot provide me an XML with translated terms

Yes, you can use the same file, however, in that case, the content will be the same in both languages.

The steps in our documentation link should work correctly for both CSV files and XMLs. Once imported, the next steps of the WP All Import configuration should be the same, regardless of the format of the file that was imported.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

August 9, 2017 at 8:57 am #1338215

Daniele

Hi Bruno,
first of all, thanks.

You must first run the default language and then the translations. This is because it is necessary to use "Unique ID" so you can make the relationship between the original content and the translation.

Right, done it. But... in my case every day something like 10 products can come in, and 10 products can go out. To keep both languages synced between theme and the stock what I have to do? Run main language import and only after that run second language import with the same stock status?
Consider that our goal is to reach a hourly update with cronjob.

Variations can be identified by an ID. This should be the easiest method to connect variations and work in the secondary language. I'll attach an image for you to see.

I've got a code, which is the unique ID of the software that generates the XML file I have to import, this code is unique for each product, and its variations are under the main product. Could it be right?
Attached General Tabs and Variations Tabs screenshot

Categories are not created automatically. In these cases, the products are created without the categories.

So, maybe it could be better to set up categories in main language, their translations in second language and then wit WPAI features setup a record matching with terms in XML to already existing categories? And when a new one come in set up everything before running sync.

Yes, you can use the same file, however, in that case, the content will be the same in both languages.
Yeah i know, but at least the layout will be good.
Typical description is like this:

Descrizione: T-Shirt a fantasia
Colore: NERO
Vestibilità: REGOLARE, il modello indossa la M, è alto 175 cm e pesa 70 kg.
Composizione: 100% COTONE

and could be translated into:

Description: T-Shirt a fantasia
Color: NERO
Fit: REGOLARE, Our modle is wearing size M, he is 175 cm tall, and 70 kg weight.
Composition: 100% COTONE

And maybe I can translate also caps words because are fixed in the software that generates XML

Thank you once again, forgive if I'm asking all these things, but I want to build it up clean and working, if you look at my other threads this site ever gives me a lot of issue.

August 9, 2017 at 9:22 pm #1338884

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Sorry for the delay.

Right, done it. But... in my case every day something like 10 products can come in, and 10 products can go out. To keep both languages synced between theme and the stock what I have to do? Run main language import and only after that run second language import with the same stock status?

Yes. The secondary language needs the primary language as a reference. Otherwise, the translations will be added in the connection with the primary language. That way, you first have to import the default language and then the secondary language.

I've got a code, which is the unique ID of the software that generates the XML file I have to import, this code is unique for each product, and its variations are under the main product. Could it be right?

Yes, this should work correctly. Remember, however, that the Unique ID must be configured on the primary language import. I'll attach an image for you to see.

Yes, you can use the same file, however, in that case, the content will be the same in both languages.
Yeah i know, but at least the layout will be good.
Typical description is like this:

You need to test to see if this will actually work, as expected. If you import a single file with all content, it will be registered in the same language. WPML will not be able to know the language of each of the products. That's why testing is important. It is recommended, as in our documentation, to separate the files.

Any other questions you may have, please let me know and I'll be happy to help you.

Thank you.

August 9, 2017 at 9:29 pm #1338889

Daniele

Hi Bruno.

You need to test to see if this will actually work, as expected. If you import a single file with all content, it will be registered in the same language. WPML will not be able to know the language of each of the products. That's why testing is important. It is recommended, as in our documentation, to separate the files.

I can ask software company that produce the XML to write the same file two times, with two names, like ExampleXML_it.xml and ExampleXML_en.xml.
This could solve the fact I think.

Anyway I'm gonna go into test, but well, I want to start with clear ideas 😉

What did you thing about categories created into WooCommerce, translated and then matched with WPAI Record Matching?

Thanks again!

August 10, 2017 at 7:40 pm #1339686

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

What did you thing about categories created into WooCommerce, translated and then matched with WPAI Record Matching?

In that case, this should work correctly. Note that these categories must be translated before the translation is imported. This is required for WPML to be able to associate products with translated categories correctly.

Any other questions you may have, please let me know and I'll be happy to help you.

Thank you.

August 14, 2017 at 9:05 am #1341336

Daniele

Ok, I'll try all these things during this week and come back asap.

August 14, 2017 at 8:13 pm #1342056

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Sure. Please let me know if I can help with any other questions you may have.

Thank you.