✅ SOLVED: Multilingual site: How to get the current locale of the site?

Hi again!
I’m working on a bilingual website. The structure is as follows

content/
  en-US/
    index.smd
  fr-FR/
    index.smd

In my navigation bar, I would like a button that toggles between the two languages (When in en-US the button displays “français”, when in fr-FR the button should display “English”).

To create the toggling, I need to be able to know if the user is on the French site or the English site. I tried doing this using locale?, but it always returns true.

<div :if="$page.locale?('en-US')">
	<a href="$site.page('').locale('fr-FR').link()" :text="$i18n.get('menu-change-language')"></a>
</div>
<div :if="$page.locale?('fr-FR')">
	<a href="$site.page('').locale('en-US').link()" :text="$i18n.get('menu-change-language')"></a>
</div>

Is there a way to get $page.isLocale?('en-US') ? Is there a smarter way to tackle this problem?

Thanks !

It took me a while, but I managed to do it using $site.localeCode().eql('fr-FR')

<div>
	<a href="$site.locale('fr-FR').page('').link()" :if="$site.localeCode().eql('en-US')" :text="$i18n.get('menu-change-language')"></a>
	<a href="$site.locale('en-US').page('').link()" :if="$site.localeCode().eql('fr-FR')" :text="$i18n.get('menu-change-language')"></a>
</div>

Yes this seems to me the correct approach, great job!