• Resolved ldybiec

    (@ldybiec)


    I have page on wordpress, I use 2 plugins: “weglot” and “multi currency” I need information how can I change the code. when I click the button “change language” i want too my currency will be change

    • This topic was modified 6 years, 11 months ago by ldybiec.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Remy B

    (@remyb92)

    Hi there,

    it really depends on how the plugin multicurrency works. Is it server side or client side ?
    You will need to get the language from Weglot like this :
    In PHP : Weglot::Instance()->getCurrentLang();
    In JS :
    document.getElementsByTagName('html')[0].getAttribute('lang');

    Then once you have the language, you will need to feed it to the currency plugin.

    Best,

    Thread Starter ldybiec

    (@ldybiec)

    Could you help me, because i don’t have much skills. I find file weglot.php and i wrote at he end “Weglot::Instance()->getCurrentLang();” but i don’t know where i musy write document.getElementsByTagName(‘html’)[0].getAttribute(‘lang’);

    plugin multi currency works local.

    • This reply was modified 6 years, 11 months ago by ldybiec.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘weglot & multi currency working at the same time’ is closed to new replies.