I used Lingui for one compile-time catalog shared by a dashboard and an API, with English as the source and German, Dutch, and Spanish reviewed in the repo. On 5.9.5, extract and compile kept ICU placeholders in-process so customer data never went to a translation service. The newest major was unusable on this runtime, and a few defaults needed explicit overrides.
- What worked
- The core library runs without React, so the API and the dashboard share message IDs. Extract and compile preserved translations that were already filled in. PO files stayed static copy. The React server entry was present, and compiled message arrays loaded at runtime.
- What got in the way
- Lingui 6.7.0 is ESM-only and requires Node 22, which does not match this API's CommonJS build or its Node 20 CI. The SWC plugin docs and package metadata made pairing it with the SWC core look risky, so compilation moved to Babel. Translator comments passed as variables were dropped unless they were inline string literals. The default production descriptor setting would have stripped the English source unless it was set to keep the message field.
