aymericzip/intlayer

Per-component Internationalisation solution for JS application. Type-Safe. Translate with AI. Edit Visually.

What it solves

Most i18n (internationalization) libraries are either too complex, too rigid, or not built for modern frameworks. Intlayer is a modern i18n solution for web and mobile apps that aims to make adding multiple languages faster, cleaner, and smarter — with per-locale content files, TypeScript autocompletion, tree-shakable dictionaries, and CI/CD integration. It also removes the need for a separate paid localization platform by bundling a free visual editor and CMS.

How it works

You declare your content once per locale in a content file (for example, a home.content.ts file using the t() function), then an Intlayer compiler automatically extracts content from your components and generates dictionary files. In your app code you retrieve all content for a component with a single hook like useIntlayer("home") — no need to call a t function everywhere. TypeScript gives you autocompletion and type safety on your content definitions.

The dictionaries are tree-shakable: only the content actually used by each component is loaded, and lazy loading is supported to keep bundles small. For translations, Intlayer offers AI-powered translation that can transform your content into 231 languages using your own AI provider/API key. A free visual editor and CMS let content writers manage translations directly, keeping content synchronized via Git or externalizing it partially or fully through the CMS. Intlayer works across frameworks (Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more), supports server components consistently, and can interoperate with existing i18n libraries like react-i18next, next-intl, react-intl, and vue-i18n.

Who it’s for

Developers building web or mobile apps that need multi-language support, especially those using modern frameworks like Next.js, React, Vite, Vue.js, Nuxt, Preact, or Express. It’s also for teams and content writers who want a free visual editor and CMS instead of paying for a separate localization platform, and for projects that want AI-assisted translation without switching providers.

Highlights

  • Framework-agnostic: compatible with Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more
  • AI-powered translation into 231 languages using your own AI provider/API key
  • Free visual editor and CMS for content writers, synced via Git or externalized via CMS
  • Per-locale content declaration files with TypeScript autocompletion and type safety
  • Tree-shakable dictionaries that load content per component and support lazy loading
  • Compiler that extracts content from components and generates dictionary files automatically
  • Single-hook content retrieval (useIntlayer) — no need to call t() for every piece of content
  • Consistent implementation for both client and server components (Next.js)
  • Markdown support for multilingual content like privacy policies and documentation
  • MCP server integration and a VSCode extension for IDE-based content management
  • Interoperability with react-i18next, next-i18next, next-intl, react-intl, and vue-i18n
  • Enhanced routing support and compatibility with static rendering

Related

  • Project
  • Project
  • Project
  • Project
  • Project