# Intlayer React

> Integrates Intlayer internationalization with React component. Use when the user asks to "setup React i18n", create a new translated component, use the "useIntlayer" hook, or configure providers.

- **Type:** Skill
- **Install:** `agentstack add skill-aymericzip-intlayer-skills-intlayer-react`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [aymericzip](https://agentstack.voostack.com/s/aymericzip)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [aymericzip](https://github.com/aymericzip)
- **Source:** https://github.com/aymericzip/intlayer-skills/tree/main/skills/intlayer-react
- **Website:** https://intlayer.org

## Install

```sh
agentstack add skill-aymericzip-intlayer-skills-intlayer-react
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Intlayer React Usage

## Core Philosophy

Intlayer promotes **Component-Level Content Declaration**. Instead of a massive global translation file, content is declared in `*.content.ts` files adjacent to the React components that use them.

## Workflow

To create a translated component, you need two files:

1.  **Declaration:** A content file (e.g., `myComponent.content.ts`) defining the dictionary.
2.  **Implementation:** A React component (e.g., `MyComponent.tsx`) using the `useIntlayer` hook.

### 1. Declare Content

Create a content file using `t()` for translations.
**File:** `src/components/MyComponent/myComponent.content.ts`

```typescript
import { t, type Dictionary } from "intlayer";

const content = {
  // The 'key' must be unique and matches what you pass to useIntlayer()
  key: "my-component",
  content: {
    text: t({
      en: "Welcome",
      fr: "Bienvenue",
      es: "Hola",
      // ... All other locales set in intlayer config file
    }),
  },
} satisfies Dictionary;

export default content;
```

# Intlayer React Usage

## Setup

- [Vite and React](references/environment_vite-and-react.md)
- [Create React App](references/environment_create-react-app.md)
- [React Router v7](references/environment_vite-and-react_react-router-v7.md)
- [React Router v7 (fs routes)](references/environment_vite-and-react_react-router-v7-fs-routes.md)
- [Tanstack Start](references/environment_tanstack-start.md)
- [React Native and Expo](references/environment_react-native-and-expo.md)
- [Lynx and React](references/environment_lynx-and-react.md)

## useIntlayer Hook

```tsx
import { useIntlayer } from "react-intlayer";
const MyComponent = () => {
  const content = useIntlayer("my-dictionary-key");
  return (
    
      
        {/* Return react node */}
        {content.text}
      
      {/* Return string (.value) */}
      
    
  );
};
```

## References

- [Website](https://intlayer.org)
- [Doc](https://intlayer.org/doc)

### Environments

- [Vite and React](references/environment_vite-and-react.md)
- [Create React App](references/environment_create-react-app.md)
- [Vite and React (React Router v7)](references/environment_vite-and-react_react-router-v7.md)
- [Vite and React (React Router v7 FS Routes)](references/environment_vite-and-react_react-router-v7-fs-routes.md)

### Packages

- [Intlayer Exports](references/packages_intlayer_exports.md)
- [React Intlayer Provider](references/packages_react-intlayer_IntlayerProvider.md)
- [React Intlayer MarkdownRenderer](references/packages_react-intlayer_MarkdownRenderer.md)
- [React Intlayer Exports](references/packages_react-intlayer_exports.md)
- [React Intlayer T](references/packages_react-intlayer_t.md)
- [React Intlayer useDictionary](references/packages_react-intlayer_useDictionary.md)
- [React Intlayer useI18n](references/packages_react-intlayer_useI18n.md)
- [React Intlayer useIntlayer](references/packages_react-intlayer_useIntlayer.md)
- [React Intlayer useLocale](references/packages_react-intlayer_useLocale.md)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [aymericzip](https://github.com/aymericzip)
- **Source:** [aymericzip/intlayer-skills](https://github.com/aymericzip/intlayer-skills)
- **License:** Apache-2.0
- **Homepage:** https://intlayer.org

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-aymericzip-intlayer-skills-intlayer-react
- Seller: https://agentstack.voostack.com/s/aymericzip
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
