Language Tag Missing on Exported Sites - New Error

The language code is missing on newer sites when exported. This ‘error’ has been accepted and acknowledged by Webflow Support. They escalated this issue to their Engineering team for further investigation about 4 weeks ago.

In the meantime, the suggested workaround* for this error doesn’t work for me, as I have lots of websites with lots of pages being updated regularly.

*The suggested workaround was: “to open the exported code within a code editor and manually add the Language code in the HTML.”

Can anyone help suggest a solution that’s scalable/manageable please (whilst we’re waiting for the error to be fixed)?

Thank you
Simon

When exported :thinking:

I don’t think localization is supported in code export? So you are likely talking about the basic language tag set at the site-wide level?

If so, the best approach is probably a simple node script that you can run, or a python script using beautifulsoup for the html parsing.

If you’re on link or macOS you could probably use sed.
Something like;

find ./export -name "*.html" -exec sed -i '' 's/<html\(.\{0,\}\)>/<html lang="en"\1>/' {} +
1 Like