Restricting scripts to language layers

In this article:


     

    Attention  
    This section is aimed at people with coding experience (web designers and developers). If you're looking for general setup and design articles, take a look at here.

    If you want to insert a script that will only run if a specific language is selected, you can use this generator to surround your script with Smarty-code. The code checks the page's language ID and only executes the script if the entered language code matches the current language of the page.

    Paste your script in the first field and then enter the language code (can be read under Settings > Languages and domains ). Click Generate code and copy the result from the bottom field.

     






    Result to insert into the shop system: