import vitePluginsAutoI18n, { VolcengineTranslator  } from 'vite-auto-i18n-plugin'

export default function createAutoI18n() {
  /**
   * 多语言插件配置项
   * https://github.com/auto-i18n/auto-i18n-translation-plugins?tab=readme-ov-file#readme
   */
  return vitePluginsAutoI18n({
    deepScan: true,
    buildToDist: true,
    globalPath: './lang',
    namespace: 'lang',
    distPath: './dist/assets',
    distKey: 'index',
    targetLangList: ['en'],
    originLang: 'zh-cn',
    translator: new VolcengineTranslator({
        apiKey: '6c0c82da-848c-4729-9381-9ff04fef059a',
        model: 'kimi-k2-250711'
    }),
  })
}