Hello everyone
When creating a site I faced the problem of multilingualism. The site has an application Wix - Table Master, to which are connected Google Sheets.
When I changed the language, the data in the tables naturally did not translate.
While I had two languages on my site, I created different tables for those languages and found a solution to this problem as follows:
import wixWindow from ‘wix-window’;
$w.onReady(function () {
let myLang = wixWindow.multilingual.currentLanguage;
if (myLang === ‘de’) {
$w(‘#section2’).hide();
$w(‘#section2’).collapse();
$w(‘#section3’).show();
$w(‘#section3’).expand();
}
else {
$w(‘#section3’).hide();
$w(‘#section3’).collapse();
$w(‘#section2’).show();
$w(‘#section2’).expand();
};
});
But when I added a third language, it became necessary to add “code”, but my attempts were unsuccessful.
Thank you. It all worked. I also wrote a similar one earlier, but it didn’t work. I compared your code with mine and realized I made a syntactic mistake(((