Add client config api

This commit is contained in:
2024-05-24 17:56:58 +08:00
parent d64917914f
commit fd680931bd
5 changed files with 121 additions and 2 deletions

View File

@@ -63,7 +63,8 @@ export function i18n_handle_request(req: Request) {
const a = req.headers.get("Accept-Language");
const l = (a
? pick(LANGUAGES, a) || pick(LANGUAGES, a, { loose: true })
: null) || "en";
: null) ||
"en";
const params = new URLSearchParams();
params.append("lang", l);
for (const p of u.searchParams.entries()) {