feat(www): locale specific urls (#12508)

This commit is contained in:
Adam
2026-02-06 11:30:40 -06:00
committed by GitHub
parent 8069197329
commit 24cd84cda5
33 changed files with 279 additions and 134 deletions

View File

@@ -13,6 +13,7 @@ import {
localeFromCookieHeader,
localeFromRequest,
parseLocale,
route as localeRoute,
tag as localeTag,
} from "~/lib/language"
@@ -54,6 +55,9 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
label: localeLabel,
tag: localeTag,
dir: localeDir,
route(pathname: string) {
return localeRoute(store.locale, pathname)
},
setLocale(next: Locale) {
setStore("locale", next)
if (typeof document !== "object") return