
Nuxt I18n Micro is a fast, simple, and lightweight internationalization (i18n) module for Nuxt. Despite its compact size, it's designed with large projects in mind, offering significant performance improvements over traditional i18n solutions like nuxt-i18n. The module was built from the ground up to be highly efficient, focusing on minimizing build times, reducing server load, and shrinking bundle sizes.
The Nuxt I18n Micro module was created to address critical performance issues found in the original nuxt-i18n module, particularly in high-traffic environments and projects with large translation files. Key issues with nuxt-i18n include:
To showcase the efficiency of Nuxt I18n Micro, we ran the same fixture suite via pnpm test:performance (pnpm -C scripts cli performance) against @nuxtjs/i18n@10.6.0 on the same hardware. We also include a plain-nuxt baseline (no i18n module) to measure the real overhead.
Note: The
plain-nuxtbaseline is a minimal implementation created solely for benchmarking purposes. It loads data directly from JSON files without any i18n logic. Latest run:@nuxtjs/i18n@10.6.0, mean of 3 consecutive runs per fixture, default CLI profile (~16.8k index leaves).
| Project | Build Time | Code Bundle | Max Memory | Max CPU |
|---|---|---|---|---|
| plain-nuxt (baseline) | 5.32s | 1.53 MB | 810 MB | 207% |
| i18n-micro | 5.34s | 1.74 MB | 1,065 MB | 204% |
| @nuxtjs/i18n v10.6 | 8.34s | 2.16 MB | 1,821 MB | 204% |
Code Bundle = JS/CSS only (excludes classified translation payloads, including
@nuxtjs/i18nchunks/raw/*). Older tables that showed ~15 MB “code” for v10.6 were counting message chunks as app code.
| Project | Avg Response (Artillery) | RPS (Artillery) | RPS (Autocannon) | Avg Latency (AC) |
|---|---|---|---|---|
| plain-nuxt | 1,194 ms | 109 | 65 | 152 ms |
| i18n-micro | 483 ms | 275 | 162 | 62 ms |
| @nuxtjs/i18n v10.6 | 956 ms | 143 | 72 | 139 ms |
@nuxtjs/i18n v10.6 vs i18n-microMicro leads on build cost and especially under load. See the full benchmark report for methodology and charts.
Nuxt I18n Micro is designed for large-scale projects, focusing on performance and efficiency.@i18n-micro/route-strategy (build-time) and @i18n-micro/path-strategy (runtime), with strategies such as prefix, no_prefix, prefix_except_default, and prefix_and_default.dev mode if not present.Install the module in your Nuxt application with:
npm install nuxt-i18n-micro
Then, add it to your nuxt.config.ts:
export default defineNuxtConfig({
modules: [
'nuxt-i18n-micro',
],
i18n: {
locales: [
{ code: 'en', iso: 'en-US', dir: 'ltr' },
{ code: 'fr', iso: 'fr-FR', dir: 'ltr' },
{ code: 'ar', iso: 'ar-SA', dir: 'rtl' },
],
defaultLocale: 'en',
translationDir: 'locales',
meta: true,
},
})
That's it! You're now ready to use Nuxt I18n Micro in your Nuxt app.