The problem with translating Tables

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.

Who can suggest a solution? Thanks in advance.

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 if (myLang === 'ru') {
     $w('#section3').hide();
     $w('#section3').collapse();
     $w('#section2').show();
     $w('#section2').expand();
  };
  else if (myLang === 'fr') {
     $w('#section3').hide();
     $w('#section3').collapse();
     $w('#section2').show();
     $w('#section2').expand();
  };
  else {?????????????????????????????}
});

Or you use → CASE -statements…

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(((

You mean → SYNTAX-ERROR:grinning: