feat(i18n): add Russian UI and harden localization

This commit is contained in:
Arthur Koba
2026-10-25 22:35:32 +03:00
parent 65a96670d5
commit b4e94076c9
115 changed files with 7767 additions and 993 deletions
+29
View File
@@ -0,0 +1,29 @@
import { createTranslator } from 'next-intl';
import english from '@/messages/fragments/runtime.en.json';
import chinese from '@/messages/fragments/runtime.zh-CN.json';
import russian from '@/messages/fragments/runtime.ru.json';
import type { AppLocale } from './config';
export type RuntimeKey = keyof typeof english.runtime;
const translators = {
en: createTranslator({
locale: 'en',
messages: english,
namespace: 'runtime',
}),
'zh-CN': createTranslator({
locale: 'zh-CN',
messages: chinese,
namespace: 'runtime',
}),
ru: createTranslator({
locale: 'ru',
messages: russian,
namespace: 'runtime',
}),
};
export function getRuntimeTranslator(locale: AppLocale) {
return translators[locale];
}