Files
lobe-chat/.i18nrc.js
T

54 lines
1.3 KiB
JavaScript
Raw Normal View History

const { defineConfig } = require('@lobehub/i18n-cli');
2026-04-10 10:44:09 +08:00
const fs = require('node:fs');
const path = require('node:path');
module.exports = defineConfig({
2025-12-26 00:09:21 +08:00
entry: 'locales/en-US',
entryLocale: 'en-US',
output: 'locales',
outputLocales: [
2024-01-15 18:27:24 +02:00
'ar',
2024-03-28 19:55:45 +02:00
'bg-BG',
2025-12-26 00:09:21 +08:00
'zh-CN',
'zh-TW',
'ru-RU',
'ja-JP',
'ko-KR',
'fr-FR',
'tr-TR',
'es-ES',
'pt-BR',
'de-DE',
'it-IT',
'nl-NL',
'pl-PL',
'vi-VN',
2024-10-30 23:34:17 +08:00
'fa-IR',
],
temperature: 0,
2025-06-10 13:38:53 +08:00
saveImmediately: true,
modelName: 'gpt-4o',
2023-12-13 17:42:26 +08:00
experimental: {
jsonMode: true,
},
markdown: {
2025-12-19 23:13:22 +08:00
reference:
'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 10:44:09 +08:00
fs.readFileSync(path.join(__dirname, 'docs/glossary.md'), 'utf8'),
entry: ['./README.md', './docs/**/*.md', './docs/**/*.mdx'],
entryLocale: 'en-US',
outputLocales: ['zh-CN'],
2024-11-26 14:48:06 +08:00
includeMatter: true,
exclude: ['./README.zh-CN.md', './docs/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
2024-04-11 00:28:48 +08: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 17:42:26 +08:00
},
},
});