One way to do this would be to set sessions, and read the data from session to see if it is spanish or english. Then based on the session, give the text element the relevant text
let text;
wixData.query("CollectionName").find().
then( (results) => {
if(session.getItem('spanish')){
text = results.items[0].description_spanish
} else {
text = results.items[0].description_english;
}
});
$w('#text1).text = text;
I am trying to connect the table view (in style of pricing list) with 3 different databases as I have 3 different languages on the site. Unfortunately I do not know what code to use, or in case what everything I need to change in the code above so it will serve my purpose.
I have same problem. I want to know through wix code the current language selected in multilingual app. I dont want to enable sessions. That would be an unnecessary work