mirror of
https://github.com/YuzuZensai/VRC-Circle.git
synced 2026-09-13 19:08:52 +00:00
♻️ refactor: centralize app settings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user