Change product when language is changed

Hey guys,

I am currently working on developing my multilingual website, but now I have a problem. I don’t know how, but I want that when I change the language to german that the product changes to the german version too. I have already made two product versions, one for english customers and one for german ones. But I don’t know how to do it.
I am working with the normal WIX editor.

Thanks in advance
Have a nice day!

1 Like

Deine Beschreibung reicht leider nicht aus (nicht detailliert genug).

Please add more details and eventually also some pics of your setup.
Which part of your setup ist not working?
When you are talking about → PRODUCTS ← that means you are using Wix-Stores, and the Wix-Stores part is not translated?

Wie wir sehen, so langsam gehts ins DETAIL.

Hello, on the first picture the website is in english, except for the product, as the product which has to be taken should be the german version. The question is, how can I link the english version of the product when the website is the english one? Because right now the only version of the product which is represented is the german one.
I have made a german and an english version of the product and as well have a translation from the english version to the german one. But if I use the mulitlingual tool to switch between german and english the text will be changed and not the images.

Ok, you say, you have made a german and an english version, that means, you have 2-different products with different product-IDs, right?

So first we need to know, which language is currently running on your system…

Now, when you know, which language is running, you need to select the right PRODUCT ----> right PRODUCT-ID.

import wixWindowFrontend from 'wix-window-frontend';

let language = wixWindowFrontend.multilingual.currentLanguage; // "en"
if(language==='en') {console.log('English version running...')}
else if(language==='de') {console.log('German version running...')}
else if(language==='es') {console.log('Spanish version running...')}

Expand and complete the code for your needs.