i18n-pro
Version:
An out-of-the-box, lightweight JavaScript i18n auto-translation solution
26 lines (23 loc) • 586 B
text/typescript
import { fileURLToPath } from 'node:url'
import { join, dirname } from 'node:path'
import { Config } from '../src/type'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
export default {
funcName: 't',
// entry: join(__dirname, './src/'),
// fileRegExp: /\.[jt]s$/,
input: 'src/**/*.{js,ts}',
output: {
path: join(__dirname, './i18n/'),
},
translator: 'googlex',
googlexConfig: {
from: 'en',
to: ['zh-CN', 'ja'],
codeLocaleMap: {
'zh-CN': 'zh',
},
// proxy: 'http://127.0.0.1:7997',
},
} as Config