Skip to content

🎧 Your Personal Streaming Service

Give page the right lang attribute (#2299)

Subhajit Ghoshda21acba92fc
diff --git a/ui/src/App.js b/ui/src/App.js
index 6d1853349..30df35e02 100644
--- a/ui/src/App.js
+++ b/ui/src/App.js
@@ -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 />
}
diff --git a/ui/src/personal/SelectLanguage.js b/ui/src/personal/SelectLanguage.js
index 700d902e1..49b879fa3 100644
--- a/ui/src/personal/SelectLanguage.js
+++ b/ui/src/personal/SelectLanguage.js
@@ -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
})
}}
/>