这是indexloc提供的服务,不要输入任何密码
Skip to content

Update the html lang attribute #967

@jmsche

Description

@jmsche

Hi,

In an application, I have the lang attribute set on the <html> tag.
When the user switches the locale, the body is changed with Turbo.
However, the lang attribute is not updated by Turbo, and some of my JavaScript relies on this attribute to use the correct locale.

I know that I could either add an event listener listening to a Turbo event to update the attribute, or trigger a full page refresh instead.

Would it make sense for Turbo to also update the lang attribute by default instead of adding custom logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions