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

Set html lang attr to the interface language #1176

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Set html lang attr to the interface language #1176

merged 1 commit into from
Jun 12, 2023

Conversation

MageJohn
Copy link
Contributor

@MageJohn MageJohn commented Jun 11, 2023

Fixes #1168

As there are issues with running the main branch with the current backend repo, I tested this by cherry-picking to use_http_client_2.

My change fixes the linked issue by setting the lang attribute of the html tag properly in accordance to the lemmy user preferences or user-agent preferences. If the lemmy user has a UI language other than "Browser" set, then the response from the server will already have the correct lang set. Otherwise the attr is set on the client side according to the language settings in the browser. If any of this fails, it falls back to English.

@MageJohn MageJohn marked this pull request as ready for review June 11, 2023 22:20
@MageJohn
Copy link
Contributor Author

Just rebased onto main so that the CI would pass.

@SleeplessOne1917 SleeplessOne1917 merged commit d56addf into LemmyNet:main Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Accessibility] global HTML lang attribute must match Lemmy's UI language, be overridden on a post basis
2 participants