intlayer-usage
Original:🇺🇸 English
Translated
Provides general guidelines for using Intlayer in any project. Use when the user asks to "get started with Intlayer", "declare content files", or understand the "project structure" for internationalization.
3installs
Added on
NPX Install
npx skill4agent add aymericzip/intlayer-skills intlayer-usageTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Intlayer Usage
To use Intlayer effectively:
-
Retrieve Locales: Check,
intlayer.config.{ts,js,json,json5,jsonc,cjs,mjs}to see the configured locales..intlayerrc -
Declare Content: We recommend creating one content declaration file per component, located alongside the component file. This keeps translations close to the code.
-
Consume Content: Use the provided hooks and functions to access your content.
- Intlayer Exports
- React Intlayer Exports
Common Packages:- : Core package for content declaration and utility functions.
intlayer - : React components and hooks (e.g.,
react-intlayer).useIntlayer - : Vite plugin for integration.
vite-intlayer
-
CLI Commands: Useful commands for managing your content:
- : Build the dictionaries from your content declarations.
npx intlayer build
References
-
Get Started
-
How Intlayer Works
-
Why Intlayer
-
Per-locale File