feat(i18n): add Russian (ru-RU) language support

This commit is contained in:
RockChinQ
2026-04-17 20:00:50 +08:00
parent 49239e0e08
commit 0b8ab4b54b
5 changed files with 1311 additions and 0 deletions
+3
View File
@@ -28,6 +28,7 @@ export const extractI18nObject = (i18nObject: I18nObject): string => {
if (language === 'th_TH' && i18nObject.th_TH) return i18nObject.th_TH;
if (language === 'vi_VN' && i18nObject.vi_VN) return i18nObject.vi_VN;
if (language === 'es_ES' && i18nObject.es_ES) return i18nObject.es_ES;
if (language === 'ru_RU' && i18nObject.ru_RU) return i18nObject.ru_RU;
return (
i18nObject.en_US ||
i18nObject.zh_Hans ||
@@ -56,6 +57,8 @@ export const getAPILanguageCode = (): string => {
if (language === 'vi-VN') return 'vi_VN';
// es-ES -> es_ES
if (language === 'es-ES') return 'es_ES';
// ru-RU -> ru_RU
if (language === 'ru-RU') return 'ru_RU';
// 默认返回 en
return 'en';
};