# The problem with translating Tables

**URL:** <https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475>\
**Category:** Ask the community\
**Tags:** wix-multilingual, question, code\
**Created:** [November 8, 2022, 12:51pm UTC](https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475 "2022-11-08T12:51:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rzhevskiy2305](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rzhevskiy2305/32/8620_2.png) [@rzhevskiy2305](https://forum.wixstudio.com/u/rzhevskiy2305)\
**Post date:** [November 8, 2022, 12:51pm UTC](https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475/1 "2022-11-08T12:51:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [November 8, 2022, 5:58pm UTC](https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475/2 "2022-11-08T17:58:22Z")

</div>

```javascript
import wixWindow from 'wix-window';

```

```javascript

$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();
  };

```

```javascript
  else if (myLang === 'fr') {
     $w('#section3').hide();
     $w('#section3').collapse();
     $w('#section2').show();
     $w('#section2').expand();
  };

```

```javascript
  else {?????????????????????????????}
});

```

Or you use → CASE -statements…

> **[JavaScript Switch Statement](https://www.w3schools.com/js/js_switch.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

---

<div class="post-metadata">

**Author:** ![rzhevskiy2305](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rzhevskiy2305/32/8620_2.png) [@rzhevskiy2305](https://forum.wixstudio.com/u/rzhevskiy2305)\
**Post date:** [November 8, 2022, 10:54pm UTC](https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475/3 "2022-11-08T22:54:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [November 9, 2022, 12:10am UTC](https://forum.wixstudio.com/t/the-problem-with-translating-tables/11475/4 "2022-11-09T00:10:00Z")

</div>

You mean → **SYNTAX-ERROR** ← 😀

> **[Syntax (programming languages)](https://en.wikipedia.org/wiki/Syntax_(programming_languages))**
>
> In computer science, the syntax of a computer language is the rules that define the combinations of symbols that are considered to be correctly structured statements or expressions in that language. This applies both to programming languages, where the document represents source code, and to markup languages, where the document represents data.
> The syntax of a language defines its surface form. Text-based computer languages are based on sequences of characters, while visual programming languages...
