summaryrefslogtreecommitdiff
path: root/site/index.html
diff options
context:
space:
mode:
authorstuebinm2021-04-08 18:06:58 +0200
committerstuebinm2021-04-08 18:32:33 +0200
commit1c5b1e38820f411563efb265b18c4cba6c518074 (patch)
treefae39036ea35e43f1b66136ad0e6910a2865f7f5 /site/index.html
parent3890d8ac88b2fdfa7b54d433e8e2edf2164be6f0 (diff)
site: attempt to guess default language
(from the browser's preferences set via navigator.language and navigator.languages)
Diffstat (limited to 'site/index.html')
-rw-r--r--site/index.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/site/index.html b/site/index.html
index bceb936..c2ac9c9 100644
--- a/site/index.html
+++ b/site/index.html
@@ -1,7 +1,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
- <title>test</title>
+ <title>Error</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
@@ -10,7 +10,7 @@
<script type="module">
import init, { age_encrypt, age_decrypt } from "./rage_wasm.js";
- import _, { setLang } from "./i18n.js";
+ import _, { setLang, tryBrowserDefaultLang } from "./i18n.js";
/// the basic idea here is to have functions which construct parts
/// of the DOM that renders the survey to a user. These functions
@@ -296,6 +296,8 @@
}
}
+ // attempt to set the site's language to the browsers's preference
+ tryBrowserDefaultLang();
if (surveyUrl === "") {
mkReadError (_("Error: nothing here"));
} else {