docs/development/internationalization/add-new-locale.mdx
LobeHub uses @lobehub/i18n-cli as the i18n solution, which allows for quick addition of new language support in the application.
To add new language internationalization support in LobeHub (for example, adding Thai th-TH), please follow the steps below:
.i18nrc.js file. You can find this file in the project's root directory.'th-TH' to the configuration file.module.exports = {
// ... Other configurations
outputLocales: [
'zh-TW',
'ru-RU',
'ja-JP',
// ...Other languages
'th-TH', // Add 'th-TH' to the array
],
};
LobeHub uses the @lobehub/i18n-cli 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 Thai language files:
bun run i18n
This will utilize the @lobehub/i18n-cli 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 LobeHub's contribution guidelines and provide a necessary description to explain your changes. For example, refer to a similar previous Pull Request #759.
By following the above steps, you can successfully add new language support to LobeHub and ensure that the application provides a localized experience for more users.