Use site.lang in if/has statement

Hi all!

I’m building a language switcher (2 languages) which has to be able to get check the current @site.lang to determine which flag to show. Is it possible to use the @site.lang or language code inside an if or has statement to output the specific flag?

Thanks in advance.
Freek

It isn’t currently possible to do this in handlebars - but @site.lang is a static value for the whole site, so it would always have the same value.

I think most people use client side JS to manage content switching using the URL to determine the current language.