mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-24 02:57:13 +00:00
feat(i18n): add Russian (ru-RU) language support
This commit is contained in:
@@ -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';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user