Theme Foundry & Attribute lang

Hello,
I’m having trouble with the “Foundry” theme

When I select in the Foundry stack “control center”, the language of my web page that I wish, the change is not supported.
controlcenter
The page keeps the lang attribute at “en”.
code%20source

After a quick look in the theme code, I realized that the lang attribute is hard coded in the theme.
chemin%20theme
So the lang attribute is fixed and does not change when one chooses a language in the stack.

It looks like a bug?
If it’s not a bug, where can we see the change of language statement?

Indeed I encounter problems when visitors want to translate my site with the Google tool for example. Google thinks my site is in English while in French.

Thank you

- plugin Foundry version 1.3.4.4 (1344)
- theme Foundry version 1.0.1

Hi there @babgond – I’m going to link you over to another thread as this one has been touched on here in the forums a couple of times, so it is quicker that way:

By the way, the reason it is done this way is that RW did not have language tag support until very recently, so Foundry implemented it for users in this way so you could select your language.

Hi @elixirgraphics

Thank you for your answer. :slightly_smiling_face: I understand that I am not alone with this interrogation. :thinking:

As I understand it is a JavaScript that allows to modify the lang attribute.
On the other hand, why not change also in the static part of the code of the webpage?
This would also allow Google and other SEOs to correctly detect the language of the website and when doing the validation tests with the W3C to have the correct language.
Because it seems that for modern browsers that manage JavaScript, everything is correct. On the other hand for bots and other browsers simpler, that poses problem.
While waiting for a cleaner answer / solution, I will modify the attribute directly in the source of the theme in “fr”. I’ll have to check at every update of the Foundry theme :sleepy:

Thank you

Because that has to happen in the theme itself. Themes, until very recently, allowed us to create options, also known as theme variations, based on two things – external CSS and javascript files. To change it in the base HTML you’d need to be able to modify the theme’s internal HTML. Since that was nt an option 3 or so years ago, we modified it the only way available to us and that is through javascript on page load.

Bots load the page when scraping through your site. This means it will make the change.

Also, I could change this in a future theme update – but that would totally screw everyone who has already setup their site language to anything but English.

1 Like

Still, I would prefer this and select the language again for all my projects.

I can make you my official support person for this topic then when I receive emails from everyone. LOL :rofl::rofl::rofl::rofl:

1 Like