Vite plugin that integrates translate.js for automatic website translation. Current stable version is 0.0.6, with initial release in 2024. It handles bundling the translate.js library, emitting it to the build output with version/timestamp in filename, and injecting script tags into HTML. Supports translate.js versions 3.18.66 and 4.0.3. Optionally injects an initialization script after translate.js loads. Requires Vite >=5 as a peer dependency. Ships TypeScript types.
npm install vite-plugin-translateVerified import paths — ran on the pinned version, not inferred.
Integrates translate.js into a Vite project with version and initialization script.
Remove `injectTo` from plugin options. The plugin now injects script tags in a fixed manner.
No action required yet, but watch for changelogs.
Ensure you pass a supported version string to the `version` option.
Upgrade Vite to version 5 or higher.
If you need custom script injection, consider forking the plugin or using a different approach.
Add `version: '4.0.3'` (or another supported version) to the plugin options.
Use `const { ViteTranslatePlugin } = require('vite-plugin-translate')`.Use `import { ViteTranslatePlugin } from 'vite-plugin-translate'`.Ensure `initializeScript` is set and that it runs after the library loads (the plugin handles this automatically).
No dependency data recorded yet.