intlayer-usage

📁 aymericzip/intlayer 📅 3 days ago
10
总安装量
9
周安装量
#30515
全站排名
安装命令
npx skills add https://github.com/aymericzip/intlayer --skill intlayer-usage

Agent 安装分布

opencode 9
gemini-cli 9
github-copilot 9
codex 9
windsurf 9
kimi-cli 9

Skill 文档

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