mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
🌎 i18n: Translation Docs (#232)
* added new translation docs. removed old /development/translation.mdx file to make it more accessible to find. * refactor: table to right format. * fix: cleaned up some code * updated: created per language an invitation key
This commit is contained in:
@@ -16,6 +16,7 @@ export default {
|
|||||||
remote: '☁️ Remote Hosting',
|
remote: '☁️ Remote Hosting',
|
||||||
configuration: '⚙️ Configuration',
|
configuration: '⚙️ Configuration',
|
||||||
user_guides: '📘 User Guides',
|
user_guides: '📘 User Guides',
|
||||||
|
translation: '🌍 Translation',
|
||||||
contributing: {
|
contributing: {
|
||||||
// "title": "Contributing",
|
// "title": "Contributing",
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
index: 'Intro',
|
index: 'Intro',
|
||||||
get_started: 'Get Started',
|
get_started: 'Get Started',
|
||||||
translation: 'Translation',
|
|
||||||
tools_and_plugins: 'Tools and Plugins',
|
tools_and_plugins: 'Tools and Plugins',
|
||||||
testing: 'Testing',
|
testing: 'Testing',
|
||||||
debugging: 'Debugging (WIP)',
|
debugging: 'Debugging (WIP)',
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
---
|
|
||||||
title: Contribute a Translation
|
|
||||||
description: How to add a new language to LibreChat.
|
|
||||||
---
|
|
||||||
|
|
||||||
# How to add a new language to LibreChat 🌍
|
|
||||||
|
|
||||||
## Minimum Requirements:
|
|
||||||
|
|
||||||
1. Good knowledge of the language (some terms may undergo significant changes during translation)
|
|
||||||
2. A text editor is required. While options like Notepad or Notepad++ are available, it is recommended to use **[VSCode](https://code.visualstudio.com/download)** as it is more suitable for this task..
|
|
||||||
|
|
||||||
## Language Translation
|
|
||||||
|
|
||||||
### Preparation
|
|
||||||
|
|
||||||
Fork the [LibreChat repository](https://github.librechat.ai) and download it using git clone. See: [Getting Started - GitHub](/docs/development/get_started#github)
|
|
||||||
|
|
||||||
### Add your language to `Translation.ts`:
|
|
||||||
|
|
||||||
- Navigate to the `client\src\localization` folder and open the `Translation.ts` file
|
|
||||||
|
|
||||||
- At the beginning of the code, add your language below all the others in this format:
|
|
||||||
|
|
||||||
`import Language-name from './languages/** ';`
|
|
||||||
|
|
||||||
Example (English):`import English from './languages/Eng';`
|
|
||||||
|
|
||||||
- Further down in the code, add in the language mapping, the following:
|
|
||||||
|
|
||||||
`'**-**': LanguageName,`
|
|
||||||
|
|
||||||
> Replace `**-**` with the local identifier of your language (ask ChatGPT or search it on Google).
|
|
||||||
> Replace `LanguageName` with the name of your language.
|
|
||||||
|
|
||||||
Example (English): `'en-US': English,`
|
|
||||||
|
|
||||||
### Create your new language file
|
|
||||||
|
|
||||||
- Go into the `client\src\localization\languages` folder and create a file named as follows: `**.tsx`
|
|
||||||
|
|
||||||
Example: `Eng.tsx`
|
|
||||||
|
|
||||||
- Copy all the content from `Eng.tsx` into your file and modify it as follows:
|
|
||||||
|
|
||||||
```ts filename="Eng.tsx"
|
|
||||||
// your-language-name phrases
|
|
||||||
|
|
||||||
export default {
|
|
||||||
com_ui_examples: 'Examples',
|
|
||||||
// more translations here...
|
|
||||||
```
|
|
||||||
|
|
||||||
**Translate only the part after the `:`.**
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```ts filename="**.tsx (new language)"
|
|
||||||
// my-language phrases
|
|
||||||
|
|
||||||
export default {
|
|
||||||
com_ui_examples: 'This is a translated example',
|
|
||||||
// Add more translations here
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<Callout type="warning" title="Note:">
|
|
||||||
Do not modify the `com_...` part
|
|
||||||
</Callout>
|
|
||||||
|
|
||||||
<Callout type="success" title="Important:">
|
|
||||||
- Delete the Language list after `com_nav_setting_general: 'General',` near the bottom of the file
|
|
||||||
(You do not need to translate the individual language names) - Do not delete
|
|
||||||
`com_nav_setting_data: 'Data controls'` (you need to translate it)
|
|
||||||
</Callout>
|
|
||||||
|
|
||||||
### Add your language to `Eng.tsx`
|
|
||||||
|
|
||||||
Open `Eng.tsx` and add your language to the language list in the bottom of the document.
|
|
||||||
|
|
||||||
### Add your language to the menu
|
|
||||||
|
|
||||||
- Navigate to the file `client\src\components\Nav\SettingsTabs\General\General.tsx`.
|
|
||||||
- Add your language to the `LangSelector` variable in the following way:
|
|
||||||
|
|
||||||
```ts filename="LangSelector"
|
|
||||||
export const LangSelector = ({
|
|
||||||
//other code
|
|
||||||
<option value="en-US">{localize(lang, 'com_nav_lang_english')}</option>
|
|
||||||
//other languages...
|
|
||||||
<option value="**">{localize(lang, 'com_nav_lang_your-language-name')}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
<Callout type="note">
|
|
||||||
`**-**` is the local identifier of your language and `com_nav_lang_your-language-name` stands for
|
|
||||||
the name of your language. Example: `com_nav_lang_english` or `com_nav_lang_italian`
|
|
||||||
</Callout>
|
|
||||||
|
|
||||||
**You should only need to add one line of code:**
|
|
||||||
|
|
||||||
```ts
|
|
||||||
<option value="**-**">{localize(lang, 'com_nav_lang_your-language-name')}</option>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Summary
|
|
||||||
|
|
||||||
If you followed everything you should have **one new file** and **3 modified files**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
new file: client/src/localization/languages/**.tsx <-----new language
|
|
||||||
modified: client/src/components/Nav/SettingsTabs/General/General.tsx
|
|
||||||
modified: client/src/localization/Translation.ts
|
|
||||||
modified: client/src/localization/languages/Eng.tsx
|
|
||||||
```
|
|
||||||
|
|
||||||
<Callout type="tip">You can confirm this by using the following command: `git status`</Callout>
|
|
||||||
|
|
||||||
### Commit and create a new PR
|
|
||||||
|
|
||||||
See: [Make a PR](/docs/development/get_started#create-a-pull-request-pr)
|
|
||||||
|
|
||||||
<Callout type="success" tytle="Pull Request">
|
|
||||||
- Answer all the questions, and in the "Type of Change" section, check `- [x] Translation update`
|
|
||||||
- **Delete irrelevant comments** from the PR template - Create a pull request 😎
|
|
||||||
</Callout>
|
|
||||||
3
pages/docs/translation/_meta.ts
Normal file
3
pages/docs/translation/_meta.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
index: 'Intro',
|
||||||
|
}
|
||||||
258
pages/docs/translation/index.mdx
Normal file
258
pages/docs/translation/index.mdx
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
---
|
||||||
|
title: Intro
|
||||||
|
description: A guide to contributing translations for LibreChat.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Translation Guide
|
||||||
|
|
||||||
|
Thank you for your interest in translating LibreChat! We rely on community contributions to make our application accessible to users around the globe. All translations are managed via [Locize](https://locize.com), a robust translation management system that seamlessly integrates with our project.
|
||||||
|
|
||||||
|
## How Translations Work
|
||||||
|
|
||||||
|
- **Centralized Management:**
|
||||||
|
All translation strings for LibreChat are maintained in one location on Locize. This centralization ensures consistency and simplifies updates across the entire application.
|
||||||
|
|
||||||
|
- **Automatic Updates:**
|
||||||
|
Changes made in Locize are automatically synchronized with our project. You can monitor the translation progress for each language through dynamic badges in our repository.
|
||||||
|
|
||||||
|
- **Community Driven:**
|
||||||
|
We welcome contributions in every language. Your help makes LibreChat accessible to a broader audience and supports users in their native languages.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Translation Progress
|
||||||
|
|
||||||
|
Below is our current translation progress for some of the supported languages. Feel free to check these badges and help us improve the translations further:
|
||||||
|
|
||||||
|
| Language | Translation Progress Badge |
|
||||||
|
|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| **English (en)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'en'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="EN Badge" /> |
|
||||||
|
| **Arabic (ar)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'ar'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="AR Badge" /> |
|
||||||
|
| **German (de)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'de'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="DE Badge" /> |
|
||||||
|
| **Spanish (es)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'es'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="ES Badge" /> |
|
||||||
|
| **Estonian (et)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'et'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="ET Badge" /> |
|
||||||
|
| **Finnish (fi)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'fi'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="FI Badge" /> |
|
||||||
|
| **French (fr)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'fr'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="FR Badge" /> |
|
||||||
|
| **Hebrew (he)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'he'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="HE Badge" /> |
|
||||||
|
| **Indonesian (id)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'id'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="ID Badge" /> |
|
||||||
|
| **Italian (it)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'it'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="IT Badge" /> |
|
||||||
|
| **Japanese (ja)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'ja'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="JA Badge" /> |
|
||||||
|
| **Korean (ko)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'ko'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="KO Badge" /> |
|
||||||
|
| **Dutch (nl)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'nl'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="NL Badge" /> |
|
||||||
|
| **Polish (pl)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'pl'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="PL Badge" /> |
|
||||||
|
| **Portuguese (pt)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'pt'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="PT Badge" /> |
|
||||||
|
| **Russian (ru)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'ru'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="RU Badge" /> |
|
||||||
|
| **Swedish (sv)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'sv'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="SV Badge" /> |
|
||||||
|
| **Turkish (tr)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'tr'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="TR Badge" /> |
|
||||||
|
| **Vietnamese (vi)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'vi'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="VI Badge" /> |
|
||||||
|
| **Chinese (Simplified) (zh)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'zh'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="ZH Badge" /> |
|
||||||
|
| **Chinese (Traditional) (zh-Hant)** | <img src="https://img.shields.io/badge/dynamic/json?style=for-the-badge&color=2096F3&label=Locize&query=$.versions%5B'latest'%5D.languages%5B'zh-Hant'%5D.translatedPercentage&url=https%3A%2F%2Fapi.locize.app%2Fbadgedata%2F4cb2598b-ed4d-469c-9b04-2ed531a8cb45&suffix=%25+translated" alt="ZH-HANT Badge" /> |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Before you begin translating, please follow the steps below to set up your Locize account and start contributing.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 1: Create a Locize Account
|
||||||
|
|
||||||
|
1. Visit the Registration Page
|
||||||
|
|
||||||
|
Choose your preferred language and click the corresponding link to register:
|
||||||
|
|
||||||
|
- **[English (en)](https://www.locize.app/register?invitation=tTHVYwI9TzWuOeJnKyWxSuuaDrSS5TsZqRh0BAHzebuuljz5OUXnlqbksio5WnXp)**
|
||||||
|
- **[Arabic (ar)](https://www.locize.app/register?invitation=Cn7hc6teYyY89nvQdosfXkubbj2MZi2XMzcxUP6fGglcPkAgd1AwS5Pfbr1Wu4lz)**
|
||||||
|
- **[German (de)](https://www.locize.app/register?invitation=rAXIyYNuO53txcygphdOClUR5YnNccd1MZ1Vs66p4ziOqHfM3MFiKnymdK6wLMpW)**
|
||||||
|
- **[Spanish (es)](https://www.locize.app/register?invitation=gkrRvUjxvFnRfUtynbaREj2zdbvd2FU95OFGcixGMOkcCxSwmrvOBclBZJWmERw6)**
|
||||||
|
- **[Estonian (et)](https://www.locize.app/register?invitation=q1ye9gNpYsVKvs2JS5CEjp4SBy6ovq2aUeIhAMsRoW2iVcdfxpc4GiOaHGDV85VZ)**
|
||||||
|
- **[Finnish (fi)](https://www.locize.app/register?invitation=weERAttD7ax0Zfo5w9LyfWbaP50WPbS4Vk7BF1P6wM0fe5Q0xlrJACVjTAGbkv2c)**
|
||||||
|
- **[French (fr)](https://www.locize.app/register?invitation=wz5EbZiwE9Bxev4TTAyG09PKvnFSQoOaLomxVgEKOyaLhm9oCDdhDi4TkJp8rcq5)**
|
||||||
|
- **[Hebrew (he)](https://www.locize.app/register?invitation=3LSHQxUsHYumNhw5ZJNu6Re6x699i6RGnpdKzt2BrDeNFNObxjj2lKXfZFUhb1jP)**
|
||||||
|
- **[Indonesian (id)](https://www.locize.app/register?invitation=S94A2D6glr7w64Nf27XwmvzkcnTRAWhxFoxcl7ZRnmm1dMx23kfpZCx8ROlqb6X2)**
|
||||||
|
- **[Italian (it)](https://www.locize.app/register?invitation=LI6zvAH82797Gro6lc490d34zrw8vthQPdN01n9nfk2c1LW5VVpf4Db6WL5GFHir)**
|
||||||
|
- **[Japanese (ja)](https://www.locize.app/register?invitation=VVJLuv7WjjBs0wShxZheCIvwzk7XszVsHCAMZmCQ34SJYrwIeB1GW6u2vkYNJdzk)**
|
||||||
|
- **[Korean (ko)](https://www.locize.app/register?invitation=nbL4LZMwehlTvFKNmNGgTTJt9YsZuuyCMjF9yAc92bVIWEjAc9C1G0ujsEl76dYb)**
|
||||||
|
- **[Dutch (nl)](https://www.locize.app/register?invitation=BQoligTqND5E4jlGmXJZVzkLOpo4pTf9wUyN19zZbgNB38JHaciJ2FnIbsLOXPbe)**
|
||||||
|
- **[Polish (pl)](https://www.locize.app/register?invitation=ZPiib1OoPM3OHBUow79I8iQNiFk4SHO7HASO3rHdJpKSlJwA4oxsORR2w4yJaPig)**
|
||||||
|
- **[Portuguese (pt)](https://www.locize.app/register?invitation=pqrsp34qWe3KFmnd2GgYVklyML5d7T1mcb27RCqPgYRYSmm6qiQFvTqUy2koUDQ0)**
|
||||||
|
- **[Russian (ru)](https://www.locize.app/register?invitation=rz4C3pVFdfr5XPPNTsYJvjjnC7vHDVWVOfyUzCf33MxhccdYB7vM7jxcHLacGl14)**
|
||||||
|
- **[Swedish (sv)](https://www.locize.app/register?invitation=RYtYhip5O5ACNCth1cIZpByGnZC1b3JttimEe8mrz5NDyEjVAs1PVcMIQ1in4j7D)**
|
||||||
|
- **[Turkish (tr)](https://www.locize.app/register?invitation=x3Ov59Gdrk2b76gn5pSVCwuekDs817YOYElXJn9zCYClPG2XlBORQDRygZmdBH4B)**
|
||||||
|
- **[Vietnamese (vi)](https://www.locize.app/register?invitation=rhADX8GuhgQmYrmbHT13YVg2WqMLJpgPdh1OBuujn9GoNUVW6RPipYvC20aH1xcQ)**
|
||||||
|
- **[Chinese (Simplified) (zh)](https://www.locize.app/register?invitation=6TRX7enwmxfmmIWy1SG6BhkWmQdktk4V2DIyF4n7t6SIlFjoZ5lIzhhXy4r0evR7)**
|
||||||
|
- **[Chinese (Traditional) (zh-Hant)](https://www.locize.app/register?invitation=9PWBDcMascIBGG6wwobkVT6cL7p7IncFZVqwIe0e7VZd14MJOAMQGk6IjlvgmA00)**
|
||||||
|
|
||||||
|
|
||||||
|
2. **Fill in Your Details:**
|
||||||
|
Enter your email, password, and any other required information, then click **Sign Up**.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 2: Explore the Locize Dashboard
|
||||||
|
|
||||||
|
After signing up, you’ll be directed to the Locize dashboard, where you can see an overview of the translation project.
|
||||||
|
|
||||||
|
- **Dashboard Overview:**
|
||||||
|
This page displays the available languages and progress statistics for the project.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 3: Select Your Language
|
||||||
|
|
||||||
|
1. **Open the Language Dropdown:**
|
||||||
|
Click the dropdown menu that lists all supported languages.
|
||||||
|
|
||||||
|
2. **Choose Your Preferred Language:**
|
||||||
|
For example, if you want to translate into Dutch, scroll down and select **Dutch**.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 4: Navigate to the Translation Page
|
||||||
|
|
||||||
|
After selecting your language, click on the translation progress indicator (for example, "35.61% translated"). This will take you to the page where you can contribute translations.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 5: Contribute Your Translation
|
||||||
|
|
||||||
|
1. **Browse the Translation Strings:**
|
||||||
|
The interface displays a list of translation keys along with their original texts.
|
||||||
|
|
||||||
|
2. **Select a String to Translate:**
|
||||||
|
Click on the string you wish to work on.
|
||||||
|
|
||||||
|
3. **Enter Your Translation:**
|
||||||
|
Type your translated text into the input field provided next to the original text.
|
||||||
|
|
||||||
|
4. **Review Your Work:**
|
||||||
|
Ensure that your translation is accurate and clear.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 6: Save and Submit Your Translation
|
||||||
|
|
||||||
|
1. **Submit Your Translation:**
|
||||||
|
Once you’re satisfied with your translation, click the **Save** button to submit it for review.
|
||||||
|
|
||||||
|
2. **Pending Review:**
|
||||||
|
Your submitted translation will be marked as pending and will be reviewed by project maintainers.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Step 7: Translation Approval
|
||||||
|
|
||||||
|
After review, your translation will be approved and integrated into the project.
|
||||||
|
|
||||||
|
- **Approved Translation:**
|
||||||
|
Once approved, your contribution will be reflected in the Locize dashboard and the overall translation progress.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Handling `{{0}}` and `{{1}}` in Translation Strings
|
||||||
|
|
||||||
|
Sometimes translation strings need to include dynamic content. These dynamic parts, called **interpolations**, are represented by placeholders enclosed in double curly brackets (e.g., `{{0}}` or `{{1}}`). When translating such strings, it's important to maintain these placeholders in the correct positions.
|
||||||
|
|
||||||
|
Below are two examples to help guide you:
|
||||||
|
|
||||||
|
### Example 1: Single Interpolation
|
||||||
|
|
||||||
|
Consider the translation key `com_assistants_completed_action`. The original English text is:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Talked to {{0}}
|
||||||
|
```
|
||||||
|
|
||||||
|
For the German translation, ensure the placeholder remains intact and is placed appropriately:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Mit {{0}} gesprochen
|
||||||
|
```
|
||||||
|
|
||||||
|
This image shows how a single interpolation is represented in a translation string:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 2: Multiple Interpolations
|
||||||
|
|
||||||
|
Now, look at the translation key `com_files_number_selected`, which includes two placeholders. The English version is:
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{0}} of {{1}} item(s) selected
|
||||||
|
```
|
||||||
|
|
||||||
|
In the German translation, both placeholders must be preserved and positioned correctly:
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{0}} von {{1}} Datei(en) ausgewählt
|
||||||
|
```
|
||||||
|
|
||||||
|
This image illustrates how multiple interpolations appear in translation strings:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## Adding a New Language
|
||||||
|
|
||||||
|
If you don't see your language listed in our translation table, you can help us expand our language support:
|
||||||
|
|
||||||
|
1. **Create a New Issue:**
|
||||||
|
Open a new issue in our GitHub repository: [LibreChat Issues](https://github.com/danny-avila/LibreChat/issues).
|
||||||
|
|
||||||
|
2. **Select the New Language Request Template:**
|
||||||
|
Use the **New Language Request** template and provide:
|
||||||
|
- The full name of your language (e.g., Spanish, Mandarin).
|
||||||
|
- The [ISO 639-1](https://www.w3schools.com/tags/ref_language_codes.asp) code for your language (e.g., `es` for Spanish).
|
||||||
|
|
||||||
|
3. **Collaborate with Maintainers:**
|
||||||
|
Our maintainers will review your request and work with you to integrate the new language. Once approved, your language will appear in the translation progress table, and you can start contributing.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Need Help?
|
||||||
|
|
||||||
|
If you have any questions or need assistance, please feel free to:
|
||||||
|
|
||||||
|
- **Open an Issue:**
|
||||||
|
Submit an issue in our repository: [LibreChat Issues](https://github.com/danny-avila/LibreChat/issues).
|
||||||
|
|
||||||
|
- **Join Our Discord Community:**
|
||||||
|
Connect with fellow translators on our [Discord server](https://discord.librechat.ai).
|
||||||
|
|
||||||
|
- **Contact a Maintainer:**
|
||||||
|
Reach out directly to one of our project maintainers for additional support.
|
||||||
|
|
||||||
|
Your contributions help make LibreChat accessible to users worldwide. Thank you for supporting our project, and happy translating!
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
We thank [Locize](https://locize.com) for their translation management tools that support multiple languages in LibreChat.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://locize.com" target="_blank" rel="noopener noreferrer">
|
||||||
|
<img src="https://locize.com/img/locize_color.svg" alt="Locize Logo" height="50"></img>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
Reference in New Issue
Block a user