Skip to content

Commit

Permalink
Give page the right lang attribute (#2299)
Browse files Browse the repository at this point in the history
* Fixed issue no #2174

Signed-off-by: Subhajit Ghosh <subhajitstd07@gmail.com>

* Fixed issue no #2174

---------

Signed-off-by: Subhajit Ghosh <subhajitstd07@gmail.com>
  • Loading branch information
subhajit20 committed Apr 8, 2023
1 parent 9154e44 commit da21acb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ const Admin = (props) => {
}

const AppWithHotkeys = () => {
let language = localStorage.getItem('locale') || 'en'
document.documentElement.lang = language
if (config.enableSharing && shareInfo) {
return <SharePlayer />
}
Expand Down
1 change: 1 addition & 0 deletions ui/src/personal/SelectLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const SelectLanguage = (props) => {
}
setLocale(event.target.value).then(() => {
localStorage.setItem('locale', event.target.value)
document.documentElement.lang = event.target.value
})
}}
/>
Expand Down

0 comments on commit da21acb

Please sign in to comment.