Change <html lang="en"> to <html lang="fr">

Hello everyone,
How can I change:

html lang=“en”

to

html lang=“fr”

Thanks in advance
Gérald

Hello @gerald

You can use this code:

<script>
document.querySelector('html').removeAttribute('lang');
document.querySelector('html').setAttribute('lang', 'fr');
</script>

Have a nice day :slight_smile:

2 Likes

Thanks a lot !

Doesn’t work for us. We put this in settings, custom code and still after loading the page in incognito mode, view page source we (still) see:

<html lang="en">

Hi @jordanvanbergen , looking at the “development tools” I can visualize the change (see attachment)
Have a nice day
Capture FR

I see the same:

image

TNX