Give page the right lang attribute (#2299)

* Fixed issue no #2174

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

* Fixed issue no #2174

---------

Signed-off-by: Subhajit Ghosh <subhajitstd07@gmail.com>
This commit is contained in:
Subhajit Ghosh 2023-04-08 23:09:59 +05:30 committed by GitHub
parent 9154e44eb4
commit da21acba92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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 />
}

View File

@ -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
})
}}
/>