i18next-cli Svelte plugin

April 7, 2026 ยท View on GitHub

GitHub branch check runs NPM Downloads GitHub License

This plugin is a simple TS/JS code extractor for Svelte component files, enabling i18next-cli extract to find the translation keys in <script> and in 'mustache' tags (Svelte templates.)

Getting started

Simply import i18next-cli-plugin-svelte and add it to plugins array. Here's an example i18next.config.js file:

import { defineConfig } from "i18next-cli";
import I18nextSveltePlugin from "i18next-cli-plugin-svelte";

export default defineConfig({
	// ...
	plugins: [new I18nextSveltePlugin()]
});