ru + en lang

This commit is contained in:
2026-07-11 02:54:10 +03:00
parent 106b884c03
commit 2dec5660f6
6 changed files with 82 additions and 75 deletions
+12
View File
@@ -0,0 +1,12 @@
import { en, Locale } from './en';
import { ru } from './ru';
const locales: Record<string, Locale> = { en, ru };
function detectLocale(): Locale {
const lang = (navigator.language || 'en').slice(0, 2);
return locales[lang] || en;
}
export const locale = detectLocale();
export type { Locale };