pre-bemis

This commit is contained in:
Marcelo
2026-04-22 05:04:19 +00:00
parent ac1a7900c8
commit 80d27f83b6
91 changed files with 11769 additions and 820 deletions

View File

@@ -7,6 +7,7 @@ const LOCALE_COOKIE = "mis_locale";
const LOCALE_EVENT = "mis-locale-change";
function readCookieLocale(): Locale | null {
if (typeof document === "undefined") return null;
const match = document.cookie
.split(";")
.map((part) => part.trim())
@@ -18,6 +19,7 @@ function readCookieLocale(): Locale | null {
}
function readLocale(): Locale {
if (typeof document === "undefined") return defaultLocale;
const docLang = document.documentElement.getAttribute("lang");
if (docLang === "es-MX" || docLang === "en") return docLang;
return readCookieLocale() ?? defaultLocale;