Skip to content

UF's language codes do not always map to valid HTML lang codes #1135

@alexweissman

Description

@alexweissman

In 0ba8ab4#diff-0ec1ca6d6c0abd16b8fdf4a504f04f77d102a96c10d53404405c2649a2bb8e4c we change the lang attribute of the top-level html tag in the core base template from a hardcoded value of en-US to a dynamic value pulled from the user's language/locale.

The problem is that our internal language codes are not always valid lang codes as per https://www.w3.org/2005/05/font-size-test/starhtml-test.html:
image

Notably, most of our localized codes are invalid because of the underscore. We should either change our naming schema to match RFC 3066 (which would be a breaking change) or find a way to define the corresponding lang codes. One possibility would simply to define them with a custom language key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Not Started

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions