Skip to content

Commit

Permalink
Set html language dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Dec 7, 2023
1 parent e9a073e commit e644848
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/language/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const LanguageComponent = (props: Props) => {
onLanguageSelect((language) => {
if (typeof language.url === 'string') {
navigate(language.url);

document.documentElement.lang = language.locale;
}
});

Expand Down

0 comments on commit e644848

Please sign in to comment.