A Vite/Rollup plugin for automatic i18n translation, version 1.1.16, with active releases. Supports Vue2/3, React, and other JS frameworks, integrating multiple translation services (Google, Youdao, custom) without modifying source code. Compatible with Vite, Webpack, Rsbuild, and Rollup. Detects translatable text and generates language packs automatically. Requires Node >=14.18.0 and ships TypeScript types.
npm install vite-auto-i18n-pluginVerified import paths — ran on the pinned version, not inferred.
Basic Vite configuration integrating the auto-i18n plugin with Vue and Youdao translation service.
Set hoistStatic: false and cacheHandlers: false in vue template compilerOptions.
Obtain valid appId and appKey from Youdao translation service.
Use v-if re-mount pattern as shown in docs, or trigger re-render manually.
Use import syntax or configure bundler for ESM.
Replace require with import; ensure project is configured for ESM.
Ensure plugin is properly loaded and $changeLang is used after DOM ready.
Set hoistStatic: false and cacheHandlers: false in vue plugin options.