Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexweissman opened this issue Feb 4, 2021 · 2 comments
Open

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

alexweissman opened this issue Feb 4, 2021 · 2 comments
Labels
confirmed bug Something isn't working frontend The frontend interface internationalization Related to the localization feature
Milestone

Comments

@alexweissman
Copy link
Member

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.

@alexweissman alexweissman added confirmed bug Something isn't working frontend The frontend interface internationalization Related to the localization feature labels Feb 4, 2021
@lcharette
Copy link
Member

lcharette commented Feb 4, 2021

 One possibility would simply to define them with a custom language key.

That would be the easier solution.

@Silic0nS0ldier
Copy link
Member

Odd, I thought we were swapping the underscore for a dash. Something might have broke, or I'm remembering wrong. Custom language key would be the most reliable option I think.

@lcharette lcharette added this to the 5.1.0 milestone Nov 25, 2023
@lcharette lcharette modified the milestones: 5.1.0, 5.2.0 Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Something isn't working frontend The frontend interface internationalization Related to the localization feature
Projects
Status: Not Started
Development

No branches or pull requests

3 participants