auto-i18n-plugin-core is the core package for automatic i18n translation plugins supporting Vite, Webpack, Rollup, and Rsbuild. Version 1.1.16 provides shared logic for detecting and translating hardcoded strings in Vue/React projects without source code changes. It integrates multiple translation services (Youdao, Google, custom) and generates localized language packs. The package is TypeScript-typed and supports ESM and CJS. Key differentiators include zero-code-modification translation, smart text detection, and broad build tool compatibility. Release cadence is irregular; the ecosystem is maintained but small.
npm install auto-i18n-plugin-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin with Vite and Youdao translator, including environment variable usage.
Get your own Youdao API credentials from https://ai.youdao.com.
Use window.$changeLang('en') and force re-render the root component (e.g., toggle v-if on App).Ensure translatable strings are literal strings in templates or JSX. Use explicit i18n keys for dynamic content.
Disable plugin during SSR or use client-only wrappers.
Run `npm install auto-i18n-plugin-core` and verify node_modules contains it.
Use `import plugin from 'auto-i18n-plugin-core'` instead of `import { plugin } from 'auto-i18n-plugin-core'`.Use `import { YoudaoTranslator } from 'auto-i18n-plugin-core'`.Pass `new YoudaoTranslator({ appId: '...', appKey: '...' })` inside the plugin options object.No dependency data recorded yet.