show different popup on 3 languages website

[ad_1]

ello, thank you very much for your plug in.
I have a site with three languages,
Italian (/), English (/en) and German (/de).
I’ve created three newsletter popups, one per language but i cant show only the pop up of the language of interest.

If I insert these two js codes in the popup in Italian in the other languages I do not see the popup in Italian, and it is correct.

var url = window.location.href;
if (url.indexOf(‘/en’) > 0) {return false;}
var url = window.location.href;
if (url.indexOf(‘/de’) > 0) {return false;}

but in other languages doesn’t work, probably because the Italian is in the root and using this code below make some problems (?)

var url = window.location.href;
if (url.indexOf(‘/’) > 0) {return false;}

how can I do?

Many thanks to all

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer