Install and First Translation
The shortest path
Section titled “The shortest path”- Install Lingui plus the framework package.
- Add
unplugin-lingui-macroif the app uses Lingui macros in plain.ts,.js,.tsx, or.jsx. - Add the framework integration or plugin.
- Add the framework extractor to
lingui.config.jsorlingui.config.ts. - Put a single
torTranscall on the page. - Run extraction and compile once before expanding the message set.
Choose the right authoring surface first
Section titled “Choose the right authoring surface first”- In
.svelte, start withlingui-for-svelte/macro. - In
.astro, start withlingui-for-astro/macro. - In plain JavaScript or TypeScript, start with
@lingui/core/macroandunplugin-lingui-macro. See Plain JS/TS Setup.
First message checklist
Section titled “First message checklist”- The macro compiled away during build.
- The message was extracted into the catalog.
- The translated output appears in the target locale.
If one of those three fails, debug that stage before adding more pages.