mcpField
I
intlayer-usage

intlayer-usage

github.com/aymericzipDevelopment86135 installsUpdated today
Repository

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

  1. 01Find configured locales
  2. 02Colocate declarations with components
  3. 03Access content with hooks and functions
  4. 04Build dictionaries with the CLI

Use cases

  1. 01Check locales before authoring content
  2. 02Organize component-specific translations
  3. 03Build dictionaries from declarations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aymericzip/intlayer --skill intlayer-usage

After installing, type/intlayer-usagein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENCE.md
references/
concept_how-works-intlayer.md
concept_per-locale-file.md
get-started.md
packages_intlayer_exports.md
packages_react-intlayer_exports.md
why.md

Details

From the project README

Intlayer Usage

To use Intlayer effectively:

  1. Retrieve Locales: Check intlayer.config.{ts,js,json,json5,jsonc,cjs,mjs}, .intlayerrc to see the configured locales.

  2. Declare Content: We recommend creating one content declaration file per component, located alongside the component file. This keeps translations close to the code.

  3. 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.
  4. CLI Commands: Useful commands for managing your content:

    • npx intlayer build: Build the dictionaries from your content declarations.

References

Comments

Markdown supported