mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-16 18:45:17 +00:00
fix: replace %lang% placeholder in html lang (#1071)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="%lang%">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/api/application-images/favicon" />
|
<link rel="icon" href="/api/application-images/favicon" />
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { z } from 'zod/v4';
|
|||||||
export async function setLocale(locale: Locale, reload = true) {
|
export async function setLocale(locale: Locale, reload = true) {
|
||||||
await setLocaleForLibraries(locale);
|
await setLocaleForLibraries(locale);
|
||||||
setParaglideLocale(locale, { reload });
|
setParaglideLocale(locale, { reload });
|
||||||
|
document.documentElement.lang = locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setLocaleForLibraries(
|
export async function setLocaleForLibraries(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { Toaster } from '$lib/components/ui/sonner';
|
import { Toaster } from '$lib/components/ui/sonner';
|
||||||
import { m } from '$lib/paraglide/messages';
|
import { m } from '$lib/paraglide/messages';
|
||||||
import { ModeWatcher } from 'mode-watcher';
|
import { ModeWatcher } from 'mode-watcher';
|
||||||
import type { Snippet } from 'svelte';
|
import { type Snippet } from 'svelte';
|
||||||
import '../app.css';
|
import '../app.css';
|
||||||
import type { LayoutData } from './$types';
|
import type { LayoutData } from './$types';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user