Multi Language Site Mobile Problem

Hi!
I have developed a multi language site working pretty well at desktop, and decided to make the necessary optimizations to make it mobile responsive also. When I change the preview to mobile I noticed that the menu button at mobile preview is showing the pages in all languages although one language is selected. Have you ever had that problem, and any solution way highly appreciated.
Thanks in advance.

Hi,
I’m truly sorry for the delay. How have you created your menu? Using buttons? Can you please share with us the code you used? Moreover, Can you please send a screenshot of the issue and the site URL so that we can better understand what is the issue you were referring?

Thanks,
Tal.

Hi Tal,

I follow below discussion about multi language solution and it works perfect on desktop version. https://www.wix.com/code/home/forum/community-discussion/multi-lingual-menu%3Fpage%3D1?page=1

However, now I have no clue how to achieve the mobile version with this methodology? Should I use lightbox for the mobile menu? If that’s the direction, how can I hide the mobile menu button on desktop? Can you please kindly help me?

The Link
https://hellogpeng.wixsite.com/test2

The Code
// For full API documentation, including code examples, visit Velo API Reference - Wix.com

import wixWindow from ‘wix-window’;
import {local} from ‘wix-storage’;
import wixData from ‘wix-data’;
$w.onReady( function () {
let locale = wixWindow.locale;
let lang = local.getItem(‘siteLangPref’);
if (!lang) {
//using the locale in case the user hasn’t chosen the relevant
// language
if (locale === “zh-tw”){
lang = ‘chinese’;
}
else {
lang = ‘english’;
}
}
traslateAll(lang);
});

function traslateAll(lang) {
wixData.query(‘Translation’).find().then(result => {
const allItems = result.items;
allItems.forEach(item => {
const selector = item.componentId;
if ($w(#${selector}).type === ‘$w.Button’) {
$w(#${selector}).label = item[lang];
}
if ($w(#${selector}).type === ‘$w.Text’) {
$w(#${selector}).text = item[lang];
}
});
});
}
export function ENButton_click(event) {
const lang = ‘english’;
local.setItem(“siteLangPref”, lang);
traslateAll(lang);
}
export function ZHButton_click(event) {
const lang = ‘chinese’;
local.setItem(“siteLangPref”, lang);
traslateAll(lang);
}

Thanks a lot in advance.
Grace