About intlayer-usage
A usage guide for developers integrating Intlayer content into applications. It covers locale lookup, colocated declarations, content access through packages, and dictionary builds with the CLI.
Key features
- 01Find configured locales
- 02Colocate declarations with components
- 03Access content with hooks and functions
- 04Build dictionaries with the CLI
Use cases
- 01Check locales before authoring content
- 02Organize component-specific translations
- 03Build dictionaries from declarations
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ aymericzip/ intlayer --skill intlayer-usageAfter installing, type/intlayer-usagein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
LICENCE.mdreferences/concept_how-works-intlayer.mdconcept_per-locale-file.mdget-started.mdpackages_intlayer_exports.mdpackages_react-intlayer_exports.mdwhy.mdDetails
From the project READMEIntlayer Usage
To use Intlayer effectively:
-
Retrieve Locales: Check
intlayer.config.{ts,js,json,json5,jsonc,cjs,mjs},.intlayerrcto see the configured locales. -
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.
Common Packages:
intlayer: Core package for content declaration and utility functions.react-intlayer: React components and hooks (e.g.,useIntlayer).vite-intlayer: Vite plugin for integration.
-
CLI Commands: Useful commands for managing your content:
npx intlayer build: Build the dictionaries from your content declarations.