Documentation Index
December 2, 2025 ยท View on GitHub
Complete documentation for the sveltekit-i18n ecosystem. Whether you're just getting started or need detailed API references, you'll find everything here.
๐ Getting Started
New to sveltekit-i18n? Start here:
Getting Started Guide
Time to complete: 15 minutes
Step-by-step tutorial that walks you through:
- Installing the library
- Creating your first translations
- Loading translations in your app
- Using translations in components
- Switching between languages
Perfect for: First-time users, quick setup
๐ Core Documentation
Architecture Overview
Understanding how everything works
Learn about:
- Package relationships (base, lib, parsers)
- Data flow (configuration โ loading โ translation)
- Loading strategies (route-based, SSR/CSR)
- When to use each package
- Performance considerations
Perfect for: Understanding internals, making architecture decisions
API Documentation
Complete reference for sveltekit-i18n
Includes:
- All configuration options with examples
- Parser options (modifierDefaults, customModifiers)
- Instance properties and methods (locale, etc.)
- Message format syntax
- TypeScript usage
Perfect for: Day-to-day development, looking up specific APIs
@sveltekit-i18n/base API Documentation
API reference for base package
Detailed documentation for:
- Core configuration options
- Loaders (local files, APIs, databases)
- Preprocessing strategies
- All stores and methods
- Advanced use cases
Perfect for: Using base package with custom parsers
โจ Best Practices
Best Practices Guide
Recommended patterns for production apps
Covers:
- Organization โ File structure, naming conventions
- Performance โ Lazy loading, caching, bundle optimization
- TypeScript โ Typed configuration, custom type-safe patterns
- SSR/CSR โ Server-side rendering considerations
- Component-scoped โ Isolated translation contexts
- Dynamic routes โ Locale-based routing patterns
- Content management โ CMS and database integration
- Testing โ Mocking translations, test strategies
- Production โ Deployment, monitoring, error handling
Perfect for: Building production applications, scaling your i18n implementation
๐ง Troubleshooting
Troubleshooting & FAQ
Solutions to common problems
Includes:
- Common Issues with step-by-step solutions:
- Translations not loading
- Keys displayed instead of values
- Flashing content (FOUC)
- Route-based loading problems
- Locale not changing
- TypeScript errors
- SSR errors
- Performance issues
- Debugging tips โ Inspect stores, test loaders, enable logging
- FAQ โ 15+ frequently asked questions
- Known limitations โ What to be aware of
Perfect for: Fixing issues, understanding limitations
๐จ Parser Documentation
Parsers Overview
Available parsers and creating custom ones
Learn about:
- Choosing between parsers
- Parser comparison
- Creating custom parsers
- Parser integration with base
@sveltekit-i18n/parser-default
Default parser with placeholders and modifiers
Features:
- Simple placeholder syntax:
{{name}} - Built-in modifiers: number, date, currency, ago
- Conditionals:
{{count; 1:item; default:items;}} - Comparison operators: eq, ne, lt, gt, lte, gte
- Custom modifiers
- No external dependencies
@sveltekit-i18n/parser-icu
ICU message format parser
Features:
- Industry-standard ICU syntax
- Advanced pluralization
- Select format (gender, etc.)
- Number/date/time formatting
- Comprehensive Intl support
๐ก Examples
All Examples
Working code you can learn from
Browse examples by use case:
Basic Examples
- Single Load โ Load all translations at once
- One Page โ Simple one-page app
- Multi Page โ Multiple routes (most common)
Routing Examples
- Locale Parameter โ URL parameter (
?lang=en) - Locale Router โ Path-based (
/en/about) - Locale Router Advanced โ Default locale without prefix
- Locale Router Static โ Static adapter optimized
Advanced Examples
- Component Scoped CSR โ Client-side component translations
- Component Scoped SSR โ Server-side component translations
- Fallback Locale โ Handling missing translations
Parser Examples
- Parser Default โ Default parser features
- Parser ICU โ ICU message format
Configuration Examples
- Loaders โ Different loader configurations
- Preprocess โ Preprocessing strategies
Each example includes:
- Complete working code
- Live demo on Netlify
- README with explanations
๐ฆ Package Documentation
Main Library
- sveltekit-i18n โ Main library README
- Changelog โ Version history
Core Package
- @sveltekit-i18n/base โ Base package README
- Base Changelog โ Version history
Parsers
- Parsers โ Parsers overview
- parser-default โ Default parser
- parser-icu โ ICU parser
- Parser Changelogs โ Version history
๐ฏ Quick Links by Task
I want to...
Learn the basics
Understand how it works
Look up an API
โ API Documentation or Base API Documentation
Build a production app
Fix an issue
See working code
โ Examples
Use a different parser
โ Parsers Overview
Create locale-based URLs
โ Locale Router Example or Best Practices: Dynamic Routes
Optimize performance
โ Best Practices: Performance or Architecture: Performance
Add TypeScript
โ Best Practices: TypeScript or API Docs: TypeScript
Load from API/database
โ Best Practices: Content Management or Base API: Loaders
Test my translations
Deploy to production
โ Best Practices: Production
๐ Reading Order
For Beginners
- Getting Started Guide โ Learn by building
- Examples โ See more use cases
- Best Practices โ Level up your implementation
For Advanced Users
- Architecture Overview โ Understand the system
- Base API Documentation โ Deep dive into APIs
- Parsers โ Custom message formats
For Troubleshooting
- Troubleshooting Guide โ Find your issue
- FAQ โ Common questions
- GitHub Issues โ Get help
๐ค Contributing
Interested in contributing to sveltekit-i18n?
- GitHub Repository โ Main library
- Issues โ Report bugs, request features
- Discussions โ Ask questions, share ideas
Note: We're currently looking for maintainers. If you're interested in helping maintain this project, please see this issue.
๐ 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.