Skip to content

i18n libraries

intl-ai generates translation files at build time. You choose the runtime i18n library. This page lists the supported options and their ICU compatibility.

ICU MessageFormat

Most modern i18n libraries speak ICU MessageFormat. Set processor: "icu" in your config to use it.

The main exception is i18next, which uses interpolation and plural suffixes instead of ICU syntax.

Library compatibility

LibraryNative ICUSetupBest for
react-intlYesNoneReact apps that need ICU
@formatjs/intlYesNoneFramework-agnostic ICU runtime
linguiYesBuild macroCompile-time safety, any framework
i18next-icuYes (via plugin)Install i18next-icuExisting i18next apps migrating to ICU
vue-i18n + intl-messageformatYes (via custom compiler)Custom messageCompilerVue apps that need ICU
svelte-i18nPartialManual formatter callsSvelte apps
@cookbook/solid-intlYesNoneSolid apps that need ICU
@lit/localizePartialCommunity workaroundWeb components
typesafe-i18nNoN/AType-safe i18n without ICU
rosettaNoN/ATiny footprint (298 bytes)
@solid-primitives/i18nNoN/AMinimal Solid i18n

Configuration

Set processor: "icu" in your intl-ai.config.ts when your target library uses ICU MessageFormat. Most modern libraries do.

If you use i18next, omit the processor setting or set processor: "passthrough" to preserve its style.

ts
// intl-ai.config.ts
export default {
  // ... your provider setup
  defaultLocale: "en",
  locales: ["en", "es", "fr"],
  localeDir: "./locales",
  processor: "icu", // recommended for most libraries
};

Per-library guides

Choosing a library

NeedUse
React + ICUreact-intl
Vue + ICUvue-i18n with intl-messageformat compiler
i18next syntax (no ICU)i18next + react-i18next
Compile-time type safetylingui or typesafe-i18n
Smallest bundlerosetta