Set html lang attribute from language setting

pull/5685/head
Aidan Gauland 2017-11-25 22:58:52 +13:00
parent c28d9e5cde
commit c0a5c28d80
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" style="height: 100%;">
<html id="root" lang="en" style="height: 100%;">
<head>
<meta charset="utf-8">
<title>Riot</title>

View File

@ -382,6 +382,7 @@ async function loadLanguage() {
}
try {
await languageHandler.setLanguage(langs);
document.getElementById("root").setAttribute("lang", languageHandler.getCurrentLanguage());
} catch (e) {
console.error("Unable to set language", e);
}