I managed to follow the tutorial from here: https://support.wix.com/en/article/using-multi-state-boxes-to-switch-from-ltr-to-rtl-in-your-multilingual-site to edit the 2nd language as Chinese, writing as vertical text from RTL. Please see my example here . It is all good for the desktop version, please see my code here:
import wixWindow from 'wix-window';
const RTLLangs = ['zh'];
$w.onReady(function () {
let lang = wixWindow.multilingual.currentLanguage;
if(RTLLangs.includes(lang)){
$w('#statebox9').changeState('Default2');
}
let states = $w('#statebox9').states;
let foundStates = states.filter((state)=>{state.id === lang});
if(foundStates.length>0){
$w('#statebox9').changeState(foundStates[0]);
}
else{
$w('#statebox9').changeState('Default');
}
});
However, the same site does not show the 2nd language on mobile. Would you have a solution for this? Do I need to modify the codes in order for the mobile version to show my RTL text? Thank you very much in advance.
#multistateBox