2023-07-15 11:22:16 +00:00
const { defineConfig } = require ( '@lobehub/i18n-cli' ) ;
2026-04-10 02:44:09 +00:00
const fs = require ( 'node:fs' ) ;
const path = require ( 'node:path' ) ;
2023-07-15 10:22:47 +00:00
2023-07-15 11:22:16 +00:00
module . exports = defineConfig ( {
2025-12-25 16:09:21 +00:00
entry : 'locales/en-US' ,
entryLocale : 'en-US' ,
✨ feat: Update localization paths, add new files, settings, descriptions, generate TOC, modify imports/exports, define types (#11)
This commit introduces new localization paths, adds new localization files, adds new settings and descriptions, generates a table of contents, modifies file imports and exports, and defines types for localization resources.
Changes:
- Updated localization paths
- Added new localization files
- Added new settings and descriptions
- Generated a table of contents
- Modified file imports and exports
- Defined types for localization resources
2023-07-18 01:14:13 +00:00
output : 'locales' ,
2023-12-16 06:56:06 +00:00
outputLocales : [
2024-01-15 16:27:24 +00:00
'ar' ,
2024-03-28 17:55:45 +00:00
'bg-BG' ,
2025-12-25 16:09:21 +00:00
'zh-CN' ,
2023-12-22 06:59:19 +00:00
'zh-TW' ,
'ru-RU' ,
'ja-JP' ,
'ko-KR' ,
'fr-FR' ,
'tr-TR' ,
'es-ES' ,
'pt-BR' ,
'de-DE' ,
2023-12-22 08:28:22 +00:00
'it-IT' ,
'nl-NL' ,
'pl-PL' ,
2024-01-03 09:00:57 +00:00
'vi-VN' ,
2024-10-30 15:34:17 +00:00
'fa-IR' ,
2023-12-16 06:56:06 +00:00
] ,
2023-07-15 10:22:47 +00:00
temperature : 0 ,
2025-06-10 05:38:53 +00:00
saveImmediately : true ,
2026-04-10 02:44:09 +00:00
modelName : 'gpt-5.1-chat-latest' ,
2023-12-13 09:42:26 +00:00
experimental : {
jsonMode : true ,
} ,
markdown : {
2025-12-19 15:13:22 +00:00
reference :
2026-01-26 07:28:33 +00:00
'You need to maintain the component format of the mdx file; the output text does not need to be wrapped in any code block syntax on the outermost layer.\n' +
2026-04-10 02:44:09 +00:00
fs . readFileSync ( path . join ( _ _dirname , 'docs/glossary.md' ) , 'utf8' ) ,
2026-01-26 07:28:33 +00:00
entry : [ './README.md' , './docs/**/*.md' , './docs/**/*.mdx' ] ,
entryLocale : 'en-US' ,
outputLocales : [ 'zh-CN' ] ,
2024-11-26 06:48:06 +00:00
includeMatter : true ,
2026-01-26 07:28:33 +00:00
exclude : [ './README.zh-CN.md' , './docs/**/*.zh-CN.md' , './docs/**/*.zh-CN.mdx' ] ,
2024-04-10 16:28:48 +00:00
outputExtensions : ( locale , { filePath } ) => {
if ( filePath . includes ( '.mdx' ) ) {
if ( locale === 'en-US' ) return '.mdx' ;
return ` . ${ locale } .mdx ` ;
} else {
if ( locale === 'en-US' ) return '.md' ;
return ` . ${ locale } .md ` ;
}
2023-12-13 09:42:26 +00:00
} ,
} ,
2023-07-15 11:22:16 +00:00
} ) ;