mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 07:06:39 +08:00
¿Qué problema resuelve este PR? Archivo TS para la traducción al idioma español Este archivo TS es un archivo de traducción que se utiliza para proporcionar soporte multilingüe en las aplicaciones. Al agregar la traducción al español, se facilita el cambio del idioma de la interfaz de usuario para los usuarios hispanohablantes. Tipo de cambio - [x] Nueva funcionalidad (cambio no disruptivo que agrega una nueva característica) ### What problem does this PR solve? This TS file is a translation file used to provide multilingual support in applications. By adding the Spanish translation, it facilitates changing the user interface language for Spanish-speaking users._ ### Type of change - [x] New Feature (non-breaking change which adds functionality)
34 lines
808 B
TypeScript
34 lines
808 B
TypeScript
import i18n from 'i18next';
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
import translation_en from './en';
|
|
import translation_es from './es';
|
|
import translation_id from './id';
|
|
import translation_zh from './zh';
|
|
import translation_zh_traditional from './zh-traditional';
|
|
const resources = {
|
|
en: translation_en,
|
|
zh: translation_zh,
|
|
'zh-TRADITIONAL': translation_zh_traditional,
|
|
id: translation_id,
|
|
es: translation_es,
|
|
};
|
|
|
|
i18n
|
|
.use(initReactI18next)
|
|
.use(LanguageDetector)
|
|
.init({
|
|
detection: {
|
|
lookupLocalStorage: 'lng',
|
|
},
|
|
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es'],
|
|
resources,
|
|
fallbackLng: 'en',
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
|
|
export default i18n;
|