Migrate I18next To Lingui
This skill walks you through converting an i18next-based project to Lingui, from installing dependencies and configuring build tools through rewriting React components and translation strings. It addresses namespace mapping, plural form restructuring, and catalog format changes, then shows how to extract and compile your messages for production.
Migrate I18next To Lingui helps you convert i18next implementations to Lingui with step-by-step patterns for components, strings, and catalogs.
AI-generated summary based on this skill's SKILL.md
Install
lingui/skills/migrate-i18next-to-lingui
git clone https://github.com/lingui/skills
cp -r skills ~/.claude/skills/migrate-i18next-to-linguigenerated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I migrate i18next to lingui in my project?
Migrate I18next To Lingui guides you through the full conversion process. Start by installing Lingui dependencies and configuring your build tools, then map your i18next namespaces to Lingui catalogs. Rewrite React components to use Lingui's JSX macros instead of i18next hooks, restructure plural forms to match Lingui's syntax, and convert your translation files to Lingui's catalog format. Finally, extract and compile messages for production.
What does converting i18next project to lingui involve?
Converting an i18next project to Lingui involves several key steps covered by this skill. You'll handle namespace mapping to organize translations, restructure plural form syntax, transform translation file formats, and rewrite your React components to use Lingui's message extraction and JSX macro system. The skill addresses catalog format changes and shows how to extract and compile your messages once the migration is complete.
Can I automate the conversion of i18next files to Lingui?
Migrate I18next To Lingui teaches automation strategies for converting your i18next translation files and configuration. While full automation depends on your project structure, the skill covers systematic approaches to transform namespaces, plural forms, and catalog formats. It provides guidance on scripting and tooling patterns to reduce manual effort, though some component rewrites in React will require code changes.
What are the main differences between i18next and Lingui?
Migrate I18next To Lingui explains key differences that affect your migration. Lingui uses JSX macros and message extraction instead of i18next's string-based approach, handles plurals with different syntax, organizes translations in catalogs rather than namespaces, and compiles messages ahead of time. Understanding these differences is essential for rewriting components and restructuring your translation files during the switch.
How do I handle i18next namespaces when switching to Lingui?
Migrate I18next To Lingui addresses namespace mapping as a core migration step. Your i18next namespaces must be reorganized into Lingui's catalog structure. The skill shows how to map namespace hierarchies, consolidate or split catalogs based on your needs, and update component imports accordingly. Proper namespace-to-catalog mapping ensures your translations remain organized and accessible after the migration.
What's the upgrade path from i18next to Lingui for my i18n?
Migrate I18next To Lingui provides a structured upgrade path for internationalization framework migration. Install and configure Lingui alongside i18next, gradually rewrite components to use Lingui's JSX macros, convert translation files incrementally, and test each phase. The skill covers extraction and compilation workflows, allowing you to transition systematically rather than attempting a complete rewrite at once.