This document describes the internationalization (i18n) system used in the RAGFlow web frontend. The system provides multi-language support across the entire user interface using i18next for translation management, supporting 13+ languages through a hierarchical namespace structure and dynamic loading.
The RAGFlow internationalization system is built on i18next and react-i18next. It manages translations for a wide range of languages, including English, Simplified Chinese, Traditional Chinese, Indonesian, Japanese, Spanish, Vietnamese, Russian, Portuguese (Brazil), German, French, Italian, Bulgarian, Arabic, Turkish, and Dutch. The system uses a dynamic loading strategy where the English reference bundle serves as the primary source of truth for keys.
Sources: web/src/locales/en.ts27-45 web/src/locales/zh.ts27-35 web/src/locales/vi.ts17-41 web/src/locales/de.ts26-33
The system supports the following languages, defined in the translation files and localized for the language selection UI:
| Language | Key | Reference File |
|---|---|---|
| English | english | en.ts |
| Simplified Chinese | chinese | zh.ts |
| Traditional Chinese | traditionalChinese | zh-traditional.ts |
| Russian | russian | ru.ts |
| Indonesian | indonesian | id.ts |
| Japanese | japanese | ja.ts |
| Vietnamese | vietnamese | vi.ts |
| Portuguese (Brazil) | portugueseBr | pt-br.ts |
| German | german | de.ts |
| Italian | italian | it.ts |
| Spanish | spanish | es.ts |
| French | french | fr.ts |
| Bulgarian | bulgarian | en.ts |
| Arabic | arabic | en.ts |
| Turkish | turkish | en.ts |
| Dutch | dutch | en.ts |
Sources: web/src/locales/en.ts27-45 web/src/locales/zh.ts27-35 web/src/locales/vi.ts17-41 web/src/locales/de.ts26-33 web/src/locales/id.ts4 web/src/locales/ja.ts40 web/src/locales/it.ts26-41
The i18n system bridges the gap between raw translation data and React UI components through a centralized configuration and a dynamic loading mechanism.
Title: I18n Data Flow and Entity Mapping
useTranslation hook and Trans component for UI integration web/package.json120en.ts, zh.ts, ja.ts, it.ts) that export a nested object containing all UI strings.Sources: web/src/locales/en.ts1-2 web/src/locales/ja.ts1-2 web/src/locales/zh.ts1-2 web/package.json95-120
Translations are organized into feature-based namespaces to maintain a manageable hierarchy.
Title: Key Hierarchy and Feature Organization
confirm, cancel, delete, and the names of all supported languages for the language switcher web/src/locales/en.ts3-82 It also includes specialized labels for the MCP (Model Context Protocol) integration such as namePlaceholder and tokenPlaceholder web/src/locales/en.ts77-83memories (list view/creation) and memory (individual memory configuration and message management). It includes specific keys for memory types like raw, semantic, episodic, and procedural web/src/locales/de.ts124-127 web/src/locales/ru.ts130-133knowledgeList for the dashboard and knowledgeDetails for specific dataset configurations web/src/locales/zh.ts98-232 This section includes complex instructions for PDF parsers (layoutRecognize) and chunking methods web/src/locales/zh-traditional.ts149-175Sources: web/src/locales/en.ts3-203 web/src/locales/zh.ts98-232 web/src/locales/de.ts113-183 web/src/locales/ru.ts120-203 web/src/locales/zh-traditional.ts149-175
The system supports dynamic content using double curly braces. For example:
skills.filesCount: '{{count}} files' (e.g., in Chinese: '{{count}} 个文件') web/src/locales/en.ts164 web/src/locales/zh.ts145knowledgeDetails.redo: 'Do you want to clear the existing {{chunkNum}} chunks?' (e.g., in Traditional Chinese: '是否清空已有 {{chunkNum}}個 chunk?') web/src/locales/zh-traditional.ts180common.top: 'Top {{top}}' web/src/locales/en.ts17For features like the Memory System, keys are deeply nested to reflect the UI structure:
memory.config.memorySizeTooltip: Provides detailed technical explanations of memory calculation including dimension byte sizes and capacity limits web/src/locales/de.ts162-163 web/src/locales/ru.ts178-179memory.messages.delMessageWarn: Warning text for destructive actions in the message list web/src/locales/de.ts149-150 web/src/locales/ru.ts165The skills.metadata section demonstrates how the system handles complex configuration UIs, with keys for information categories (basic, emoji, skillKey) and requirements (requiredBins, requiredEnv) web/src/locales/en.ts194-199 Validation messages are also localized to provide clear feedback during skill parsing, such as missing_skill_md or invalid_version web/src/locales/zh.ts190-213
Sources: web/src/locales/en.ts164-199 web/src/locales/zh.ts145-213 web/src/locales/de.ts149-163 web/src/locales/ru.ts165-179 web/src/locales/zh-traditional.ts180
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.