sveltekit-i18n Internationalization for SvelteKit

Documentation Index

Complete documentation for the sveltekit-i18n ecosystem, covering v3: one reactive instance built on Svelte 5 runes, no stores, and the parser wired in β€” npm install sveltekit-i18n is the whole install.

Upgrading from v2? Go straight to Upgrading from v2 and the migration table.


πŸš€ Getting Started

New to sveltekit-i18n? Start here:

Getting Started Guide

A SvelteKit app from nothing to multilingual, in eight steps

Perfect for: first-time users, quick setup


πŸ“š Core Documentation

Architecture Overview

Understanding how everything works

Perfect for: understanding internals, making architecture decisions

API Documentation

Complete reference for sveltekit-i18n

Perfect for: day-to-day development, looking up specific APIs

@sveltekit-i18n/base API Documentation

The canonical reference for every member this package inherits

Perfect for: member-level detail, or using the core with a custom parser


✨ Best Practices

Best Practices Guide

Recommended patterns for production apps

Perfect for: building production applications, scaling your i18n implementation


πŸ”§ Troubleshooting

Troubleshooting & FAQ

Solutions to common problems

  • Upgrading from v2 – $t is not a store, destructured values that never update, the removal of .get() / .set() / .subscribe() / toPromise() / getTranslationProps(), and instanceof
  • Setup and packaging – $state is not defined, two copies of the core, ERR_REQUIRE_ESM
  • Common issues – translations not loading, keys instead of values, flashing content, route matching, locale not changing, stale translations, one visitor's locale in another's page, silent parser reports, TypeScript errors, tests, performance
  • Debugging tips – inspect translations, enable debug logging, open the report channel, test a loader
  • FAQ – 17 common questions
  • Known limitations – what to be aware of

Perfect for: fixing issues, understanding limitations


🎨 Parser Documentation

Message interpolation lives in a parser. This package wires one; the core takes any parser that satisfies base's parser contract.

@sveltekit-i18n/parser-curly

The parser wired into this package

  • Placeholders {{name}}, default values, nested placeholders, escaping
  • Modifiers (number, date, currency, ago, …) and comparisons
  • Custom modifiers, modifier defaults and the report channel β€” all reachable here through parserOptions
  • Implements the Curly Message Format

@sveltekit-i18n/parser-icu

ICU message format

For an application that wants ICU syntax, built on @sveltekit-i18n/base directly β€” this package fills the parser slot itself and cannot take another parser.

Parsers Overview

The parser monorepo, and writing your own


πŸ’‘ Examples

All Examples

Working code you can learn from

Eight standalone applications on v3: locale routing (URL parameter, path prefix, static adapter, default locale unprefixed), per-request negotiation from a cookie and Accept-Language, component-scoped translations rendered on the client and seeded through snapshot(), and t() inside Markdown routes.


πŸ“¦ Package Documentation

This Package

The Family

base, parsers and extensions release aligned at 3.0.0; sveltekit-i18n last.


I want to...

Learn the basics

β†’ Getting Started Guide

Upgrade an app from v2

β†’ Upgrading from v2 and the migration table

Get $t back

β†’ Best Practices: Extensions

Understand how it works

β†’ Architecture Overview

Look up an API

β†’ API Documentation or base API Documentation

Render on the server without leaking a visitor's locale

β†’ API Docs: SSR or Best Practices: Instance Ownership

Build a production app

β†’ Best Practices Guide

Fix an issue

β†’ Troubleshooting Guide

See working code

β†’ Examples

Write a custom modifier or open the report channel

β†’ API Docs: Parser options or parser-curly

Use a different message format

β†’ Architecture: When to Use Each Package

Create locale-based URLs

β†’ Best Practices: Dynamic Routes

Optimize performance

β†’ Best Practices: Performance or Architecture: Performance

Type my keys and payloads

β†’ Best Practices: TypeScript or API Docs: TypeScript

Load from an API or database

β†’ Best Practices: Content Management or base API: Loaders

Test components that translate

β†’ Best Practices: Testing or Getting Started: Testing

Deploy to production

β†’ Best Practices: Production


πŸ“– Reading Order

For Beginners

  1. Getting Started Guide – learn by building
  2. API Documentation – the surface, member by member
  3. Best Practices – level up your implementation

For Upgraders

  1. Upgrading from v2 – the first-day errors
  2. Migrating from v2 – the old member, the new one
  3. Best Practices: Instance Ownership – what per-request instances change

For Advanced Users

  1. Architecture Overview – understand the system
  2. base API Documentation – deep dive
  3. Parsers and Extensions – custom message formats and custom surfaces

For Troubleshooting

  1. Troubleshooting Guide – find your issue
  2. FAQ – common questions
  3. GitHub Issues – get help

🀝 Contributing

Interested in contributing to sveltekit-i18n?


πŸ“„ License

MIT License – See individual repositories for details.


Can't find what you're looking for? Check the Troubleshooting Guide for how to get help.