-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Add New Locale
LobeChat uses lobe-i18n as the i18n solution, which allows for quick addition of new language support in the application.
To add new language internationalization support in LobeChat (for example, adding Vietnamese vi-VN
), please follow the steps below:
- Open the
.i18nrc.js
file. You can find this file in the project's root directory. - Add the new language code to the configuration file. For example, to add Vietnamese, you need to add
'vi-VN'
to the configuration file.
module.exports = {
// ... Other configurations
outputLocales: [
'zh-TW',
'en-US',
'ru-RU',
'ja-JP',
// ...Other languages
'vi-VN', // Add 'vi-VN' to the array
],
};
LobeChat uses the lobe-i18n
tool to automatically translate language files, so manual updating of i18n files is not required.
Run the following command to automatically translate and generate the Vietnamese language files:
npm run i18n
This will utilize the lobe-i18n
tool to process the language files.
Once you have completed the above steps, you need to submit your changes and create a Pull Request.
Ensure that you follow LobeChat's contribution guidelines and provide a necessary description to explain your changes. For example, refer to a similar previous Pull Request #759.
- After submitting your Pull Request, please patiently wait for the project maintainers to review it.
- If you encounter any issues, you can reach out to the LobeChat community for assistance.
- For more accurate results, ensure that your Pull Request is based on the latest main branch and stays in sync with the main branch.
By following the above steps, you can successfully add new language support to LobeChat and ensure that the application provides a localized experience for more users.
This is the 🤯 / 🤖 Lobe Chat wiki. Wiki Home
- Architecture Design | 架构设计
- Code Style and Contribution Guidelines | 代码风格与贡献指南
- Complete Guide to LobeChat Feature Development | LobeChat 功能开发完全指南
- Conversation API Implementation Logic | 会话 API 实现逻辑
- Directory Structure | 目录架构
- Environment Setup Guide | 环境设置指南
- How to Develop a New Feature | 如何开发一个新功能:前端实现
- New Authentication Provider Guide | 新身份验证方式开发指南
- Resources and References | 资源与参考
- Technical Development Getting Started Guide | 技术开发上手指南
- Testing Guide | 测试指南