Dear forum.
I’ve recently launched the English version of my website. On my native (Danish) version, I have a pop-up that prompts the user to sign up for my newsletter after 8 seconds on the site - but since I do not have an English newsletter yet, I’d like to NOT show the pop-up if the selected language is English.
I’ve looked at this thread: Hide Lightbox from multilingual site - #4 by ahmadnasriya
…but it’s not working for me. I suspect it might be because I’m already calling some other functions (to filter database-content based on language), and I might not be putting it all together correctly…
On top of that I also have the same question as was posted in the above mentioned thread: if I want to wait a number of seconds before loading the pop-up, how do I do that? And how do I make sure the database content is loaded BEFORE the “x second” wait for the pop-up starts?
The code I use is:
import wixWindow from ‘wix-window’;
import wixData from ‘wix-data’;// …
$w.onReady( function () {
let language = wixWindow.multilingual.currentLanguage;
$w(“#dataset1”).setFilter( wixData.filter().eq(“language”, language) );
> if (language === ‘da’) {
> wixWindow.openLightbox(‘#lightbox1’);
}
);export function repeater5_itemReady($item) {
let language = wixWindow.multilingual.currentLanguage;
$w(“#dataset1”).setFilter( wixData.filter().eq(“language”, language) );
}
Thanks in advance!