Handlebar variable for site selected language?

BenSky Member Posts: 4

I have a multi language site and I want to output the selected language into a HTML widget which contains an IFRAME to embed a different URL based on the language selected. So, is there a handlebar variable I can use to output the current language selected on a multi language site?

Best Answer

  • Bruce_McCaughan
    Bruce_McCaughan Member Posts: 124 Learner
    Answer ✓

    Not sure why you would need a {handlebar}.
    The multi-lang pages are independent of each other, so if you have the embed code/URL just embed the correct code/url for each language on its corresponding page.

    That said, in all likelihood, I am not understanding the issue.


  • ScottyStrehlow
    ScottyStrehlow Member Posts: 262 Duda Staff

    Hi @BenSky - I believe @Bruce_McCaughan is correct here.

    After checking with my team, there isn't a handlebar that you could use for this. You can adjust the HTML widget in the other languages needed manually for the different pages.

  • BenSky
    BenSky Member Posts: 4

    Hi guys thanks for this! Yes I was aware that I could change the widget on each page. If there was a variable it would save a lot of work as the widget is repeated on many pages of the site, then when there's multiple languages it multiplies the pages further. :) No problem though I'll do it manually, thanks!

  • ScottyStrehlow
    ScottyStrehlow Member Posts: 262 Duda Staff

    Hi @BenSky - yes, I realize that this manual process is not ideal for your use case. I have passed this over to our Product team to consider for future updates!