• Resolved seyfer

    (@seyfer)


    Hello

    I have a case, when I need to show a javascript code snipped depending on the website language.
    F.e. I have /de/ and /en/ added to the website URL, when language switches.
    I need one snippet loaded for de and another one for en.
    Is it possible?

    The language switch is implemented using plugin:
    WPML Multilingual CMS

    Maybe I can write a custom JS, that will observe URL change, and dynamiclaly insert another js src based on the language?
    Any other way?

    Best,
    Oleg

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi Oleg,

    You should be able to do that using the conditional logic rules for Page URL with the “contains” operator and using /de/ or /en/ for the value for each snippet.

    Thread Starter seyfer

    (@seyfer)

    Hey Mircea,

    thank you for your answer.
    Yes it worked well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add code-snippet to footer per website language’ is closed to new replies.