♻️ refactor: centralize app settings

This commit is contained in:
2026-06-30 21:16:05 +07:00
parent 5fe93b26df
commit 9b90140cfd
20 changed files with 284 additions and 134 deletions
+13
View File
@@ -0,0 +1,13 @@
export const DEFAULT_LOCALE = "en" as const;
export const LOCALES = [
{ code: "en", nativeName: "English", englishName: "English" },
{ code: "ja", nativeName: "日本語", englishName: "Japanese" },
{ code: "th", nativeName: "ไทย", englishName: "Thai" },
] as const;
export type AppLocale = (typeof LOCALES)[number]["code"];
export function isAppLocale(value: unknown): value is AppLocale {
return typeof value === "string" && LOCALES.some((locale) => locale.code === value);
}