Intlayer Compiler Skill
The Intlayer Compiler Skill provides instructions on how to set up and use the Intlayer compiler to automatically extract content from your application.
Key Features
- Automatic Content Extraction: All content will be extracted automatically from your components.
- No Manual Content Files: Alleviates the need to manually create
.contentfiles.
Setup and Usage
To set up the Intlayer compiler for your project (Vite, Next.js, Babel, Webpack), refer to the documentation:
-
Vite (React, Preact, Solid, Lit, Vue, Svelte, Astro): bundled into the
intlayer()plugin ofvite-intlayer. -
Next.js: install
@intlayer/babel;withIntlayerregisters the extractor loader on Turbopack and webpack. -
Babel / Webpack: add
intlayerExtractBabelPluginfrom@intlayer/babel. -
.vueand.sveltefiles additionally require@intlayer/vue-compiler/@intlayer/svelte-compiler. -
Not using a supported bundler? Run
npx intlayer extractinstead.
Once the compiler plugins are properly configured, simply write your translatable strings inline according to the framework's specifics, and the Intlayer compiler will automatically generate the dictionaries.
For more information, visit the Intlayer Compiler Architecture Documentation.
微信扫一扫