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.

Our next available supporter will start replying to tickets in about 5.30 hours from now. Thank you for your understanding.

This topic contains 17 replies, has 2 voices.

Last updated by Yvette 3 months ago.

Assigned support staff: Yvette.

Author Posts
July 1, 2019 at 3:03 pm #4120497

emelieC

I use swedish as default language.

I use English as a second language.

I have now added the language: International (non-EU)

The International language should have all the same content as the English site. The difference will be in currency and the prices are shown without VAT.

When I duplicate products in the Translation Dashboard when the tags are not existing in International language, it is choosing to create new and categories tags with the Swedish default info. Meaning the tags are all in swedish and the slugs as well.

When choosing English pages and then duplicating those to Swedish, I don't want to use any of the Swedish information.

How can this be done?

What's wrong?

Thanks

Marcus

July 1, 2019 at 5:01 pm #4121277

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

1. Clarification
You wrote: "... I don't want to use any of the Swedish information...."

Question: do you mean that you do not want to copy any of the taxonomy information? or are you referring to the content?

By default, if you "duplicate" a post to another language, all the information is essentially the same as the original post. That´s why we call it a "duplicate". However, if you refer to the "taxonomy assignment" you can avoid copying the taxonomy assignment by un-marking the following option:

WPML > Settings > Posts and pages synchronization > Copy taxonomy to translations

Does this answer your question?

July 2, 2019 at 9:10 am #4125169

emelieC

1. I mean that:

- If I search Translation Dashboard like this for English (EU) products: hidden link

- And then duplicate with these settings: hidden link

- Then I want all of the content to be in English (which it is)

- But I also want to duplicate the english translation of product attributes, categories and tags from the english (EU) translation to the newly created International (non-eu) and UK languages / regions.

- Since Swedish is my default language, I had to translate all product attributes, categories and tag to English. So it has been done once.

- Now I wish to use those English translations for the two new Regions / Languages: International and UK.

- I was advised by your colleague to first duplicate all the products, and that the product attributes, categories and tags would automatically be created. I did this to 100 products, and realised that the product attributes, categories and tags that were created were actually copied from the Swedish version of the site / the default language.

- I then had to manually change back the product attributes, categories and tags that had been created and also I filled out the rest of all my hundreds of attributes manually.

- I have then done the above duplication. Now I am hoping that there are no huge surprises.

2. Basically, what I have been looking for is a way to batch copy taxonomy information from a translation rather than from the default language.

3. We have noticed another issues that has arisen. All the string translations that have been made from Swedish to English or vice versa, we would want to use all of the English (EU) translations for filling out the International (non-EU) and UK translations. So instead of now manually having to go in to translate each string (thousands), WPML should know somehow, that each string in English should be the exact same in International and UK. Is this achievable?

Sorry for the long message, but I think it was necessary for you to understand my situation. I can still explain further if needed.

Kind regards

Marcus

July 3, 2019 at 7:57 am #4132815

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

1. Attribute Translation

In general, it is advised that you handle the taxonomy translation separate from the post-type translation. e.g. first create your translated taxonomy structure as you want, then translate your products

We do not offer any kind of "bulk" taxonomy translation tools apart from the Attribute translation panel in Woocommerce > Woocommerce Multilingual > Attributes

Here, you will see the option to copy values to all translations with the option to not overwrite existing translations. But it must be done one-by-one. (see image)

In your case, the default language is SK but you want the translated values to be taken from EN. So, you would create your attributes while using the EN admin language in order for the "source" language for this attribute to be recognised as EN.

Once you have the attributes hierarchy created in the way you want, you can then duplicate your products and the correct taxonomy should be assigned.

2. Strings in new langauges
You can do this in either of 2 ways

2.1 .mo files (easiest way)
Copy the existing .mo files provided by your theme/plugin to new files following the locale naming convention defined by WordPress and place them in the correct directory: ../wp-content/languages/plugin/... or ../wp-content/langagues/themes/...

More here:
hidden link (see image)

2.2 . .po export/import
You can also use the WPML > String Translation > .po export/import tool to export the existing EN translations to a .po file (if you don´t already have one from the theme/plugin) and then use the same file to import as translations for the new EN-based languages you created.

Note - this takes up a lot of memory so sometimes it needs to be done in "steps" depending on the amt of strings to be loaded.

July 4, 2019 at 1:18 pm #4143785

emelieC

2.1 .mo files (easiest way)
You ask me to take the .mo file that comes with ie the theme. However, the theme only has a .pot file in its language folder. What to do then?
Also, I have already made several translations in string translator. It is those translations I now want to apply to the new languages. Would those be included? Do I not have to create a new .mo file based on the things I have already translated?
There is only a way to download .po files if I understand correctly from the string translations dashboard. What should I do?

Also, would I using this method need to add some code to functions? Or if I just name things right it would understand to take the languages from the folders mentioned in the post u sent?

2.2 . .po export/import
I believe this is what I should try. However, when I go to the export section, it seems like it will export the english translations, however, how does it actually know that. I cannot see that I am on the english version of that page. So just want to be sure that it is actually the english translations that will be made. There is no lang switcher on the top bar like normally:
hidden link

Thanks!

July 4, 2019 at 1:34 pm #4143941

emelieC

Hello again,

So I tried to download the .po file but there is no english translation in it. The file is in swedish.

It does give me the option to include translations as you can see in this image:
hidden link

However, English is not an option.

So selecting Swedish translation, the poeditor I use give me an error that the translation is the same language as the source language.

I think something is wrong...

July 4, 2019 at 2:02 pm #4144207

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

Can I take a look at your language files and system?
I am opening the private area for access details.

July 5, 2019 at 7:54 am #4148709

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Could you please check the credentials you provided? When I cut&paste them into the WordPress login window, they are not accepted.

July 5, 2019 at 12:41 pm #4151381

emelieC

Please check again with the same credentials.

Kind regards,

Marcus

July 5, 2019 at 2:55 pm #4152267

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Thanks - I can get in now.

So, which text domain are you interested in replicating to the EN translation to?
Let´s start with one domain to make sure we understand the process.

Thanks.

July 5, 2019 at 4:01 pm #4152709

emelieC

Ok,

The English (EU) translation should be used for the International (non-EU) translation.

Kind regards,

Marcus

July 5, 2019 at 4:12 pm #4152763

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Yes - I know that. But for which text domain??? See the image.

July 6, 2019 at 5:18 pm #4156203

emelieC

wc_product_addon_strings

Thanks!

July 8, 2019 at 8:28 am #4159933

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Alright - the process "worked" but there is a small workaround that has to be done for you to be able to export the "en" language to a .po format using the Google Inspector or the developer console for whatever browser you use.

This is what I did.
- select the "UK" language for export
- open the developer console and manually change the value to "en" . (see image)
- continue with the export.

This created the desired .po language version.

July 8, 2019 at 10:47 am #4161373

emelieC

Hello,

I have managed to download the English Version. I will try it myself on other text domains.

However, How does the system determine which language the translations go to?

If I check woocommerce text domain for instance, the default language is English (EU).

If I want that text domain to be the translation for the International and UK, BUT NOT overwrite the Swedish translations, how do I do?

Do I need to change the .po file file name to contain -in or -gb in the end before importing?

This is where I am talking about: hidden link

Also, I have now copied all attributes and products to the UK language. I have then realised I want the language code uk instead of gb as I have put. But is it enough for me to go to the database and change this language code? Or would I need to change the language code in db for all those translated attributes and products as well?

Thanks!

The topic ‘[Closed] Problems when duplicating products’ is closed to new replies.