Localization Operations and Extraction
Pack:
next-intlParent skill: Next Intl Workflows and Tooling Source:next-intl/next-intl-workflows-and-tooling/references/localization-ops-and-extraction.md
Read this when
Section titled “Read this when”- validating translation catalogs
- setting up translator workflows
- choosing Crowdin or another localization-management flow
- evaluating
useExtracted
Validation baseline
Section titled “Validation baseline”- Use
@lingual/i18n-checkto detect:- missing translations
- inconsistent ICU arguments across locales
- unused messages when
--unusedis enabled
Localization management
Section titled “Localization management”next-intlis format-agnostic, but the docs recommend Crowdin.- Useful Crowdin integration modes include:
- GitHub PR sync
- CLI-based sync
- JS SDK or webhook-driven flows
- Prefer workflows that keep translators out of application code while preserving reviewability.
- A minimal GitHub sync baseline is:
files: - source: /messages/en.json translation: /messages/%locale%.jsonuseExtracted
Section titled “useExtracted”useExtractedextracts inline source strings duringnext devandnext build.getExtracted()is the async variant for Server Components, metadata, and Server Actions.unstable_extractMessages(...)is available for manual extraction, which is useful for component libraries or package workflows outside a running Next.js app.- Extraction supports descriptions, explicit IDs, and namespaces in addition to generated keys.
- It can remove manual key management, which can be helpful in AI-heavy or design-system-heavy workflows.
- Keep it behind an explicit workflow choice because it remains experimental.
- Remember that auto-generated keys reduce translator context. Prefer metadata-rich formats like PO when context matters.
Migration and release notes
Section titled “Migration and release notes”next-intl4.x tightened TypeScript augmentation and locale typing.requestLocaleis the current async request-config input and should be awaited.createMessagesDeclarationis not required when extraction is the primary workflow.precompilebuilds on the same message-loader pipeline and is incompatible witht.raw.- Re-check blog release notes before encoding version-specific advice into long-lived skills.
Source map
Section titled “Source map”https://next-intl.dev/docs/workflowshttps://next-intl.dev/docs/workflows/messageshttps://next-intl.dev/docs/workflows/localization-managementhttps://next-intl.dev/docs/usage/extractionhttps://next-intl.dev/blog/next-intl-4-0https://next-intl.dev/blog/use-extracted