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 rokJ 2 months, 3 weeks ago.

Assigned support staff: Bobby.

Author Posts
July 9, 2019 at 2:14 pm #4171723

rokJ

Hi,

I have a question about how to completely remove the previous default language from our WordPress web shop?

We built our web shop using Woocommerce in English, which was the default language at first, and after that we added the second language (Slovenian) and it's translations for pages and products. Next we've changed Slovenian to be the default website language. Now we've decided that we don't need the English versions of pages and products anymore and would like to remove them because it messes things when we want to edit products (we still have to do it in English even though we don't need it).

How can this be achieved so that the website doesn't break?

July 9, 2019 at 7:16 pm #4173939

rokJ

Another option would also be to set the original language of all products, pages, etc. to Slovenian instead of English, so we could edit everything in that language.

We're not bothered by the English version by itself, it's just a problem when we want to edit products, its variations stock, prices, etc.

July 9, 2019 at 7:35 pm #4174087

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

being that your site's default language was English that means that all Slovenian content created so far is a translation of English.

even if you switch the default language within the site and WPML and Woocommerce all the slovenian content up until now is considered a translation of the English content therefore for example if you were to remove WPML this content would not show.

what you could potentially do is the following

make sure the default language is Slovenian
remove/delete English translations
within WPML->Settings->Post Types Translation set Pages/Posts/ and Products to Translatable - use translation if available or fallback to default language

or you can simply leave the site as is and set the English language to hidden from within WPML->Languages->Hide languages

then there is no need to continue adding content for English and just add content on the Slovenian language

let me know your results please

July 12, 2019 at 12:25 pm #4198607

rokJ

Hi,

I tested the option were the original English product was deleted and set WPML->Settings->Post Types Translation set Pages/Posts/ and Products to Translatable - use translation if available or fallback to default language.

Before I did this I also turned off the option "When deleting a post, delete translations as well" in the wpml settings, so that it doesn't take the translation in the trash too.

When doing so the Slovenian translation remains on the website and that's OK, but the problem is that the original English version used to have all the date about stock, variations, categories, tags, etc. and after I remove it from the trash the Slovenian version is without any data.

1. Is there a way to unlink all the original products from their translations, so that there is NO MORE CONNECTION between them? This way we could delete the current original versions but the translations would at the same time become originals too, after they've been unlinked.

or

2. Is there a way to delete the original English version and make all the product data (stock, category, tags) still visible and available in the second language as it used to be in the original?

Best regards,

July 13, 2019 at 6:12 am #4202993

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

1. You can go into the product edit screen (page builder view) and on the right hand side you will notice it will say "this is a translation of ..." make sure you click on the drop down and select "none"

i have test this and it worked as expected

2. as long as the category,tags, and stock are available in the Slovenian this should not be affected by deleting the English version

July 13, 2019 at 12:07 pm #4203421

rokJ

Hi,

1. This is what we needed! Only is there a way to do it for all product at once, not for every single product on its own?

2. Categories and tags were already translated, this is not a problem. When I delete the original English version the second language looses all the data - no category is checked anymore, not tag is selected, no attribute is selected, no variation data, only photos and description stay. Is there a setting inside WPML that could prevent that this data is lost in translations after you delete the original?

July 15, 2019 at 8:11 pm #4214495

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

1. Unfortunately there is no such option as this is not an out of the box function within WPML therefore you might be able to achieve it with some custom SQL script but i am not aware of one that i can recommend

for custom work we recommend contacting our 3rd party contractors
=> https://wpml.org/contractors/

2. Is this happening when you follow the steps in #1 ?

July 21, 2019 at 10:36 am #4252093

rokJ

Hi,

at the end I deleted the english versions one by one in the way you suggested.

Thank you for your help.