Skip to content

aymericzip/intlayer-skills / skills/intlayer-react

intlayer-react

Verified

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.

references/packages_react-intlayer_useIntlayer.md

View on GitHub
---
createdAt: 2026-01-21
updatedAt: 2026-09-27
priority: 5
title: useIntlayer Hook Documentation | react-intlayer
description: "Use useIntlayer in React to read a dictionary's localized content by key, typed from your content declaration files."
keywords:
  - useIntlayer
  - dictionary
  - Intlayer
  - intlayer
  - Internationalization
  - Documentation
slugs:
  - doc
  - packages
  - react-intlayer
  - useIntlayer
history:
  - version: 7.5.14
    date: 2026-01-21
    changes: "Unified documentation for all exports"
author: aymericzip
---

# useIntlayer Hook Documentation

The `useIntlayer` hook allows you to retrieve localized content from a dictionary using its key. It is based on `useDictionary` but automatically injects an optimized version of the dictionary from the generated declarations.

## Usage

```tsx
import { useIntlayer } from "react-intlayer";

const MyComponent = () => {
  const content = useIntlayer("my-dictionary-key");

  return (
    <div>
      <h1>{content.title}</h1>
      <p>{content.description}</p>
    </div>
  );
};
```

## Description

The hook performing the following tasks:

1. **Locale Detection**: It uses the current locale from the `IntlayerProvider` context.
2. **Dictionary Injection**: it automatically injects the content of the dictionary corresponding to the provided key, using the optimized declarations generated by the Intlayer compiler.
3. **Translation Processing**: it resolves the content based on the detected locale, processing any `t()`, `enu()`, etc., definitions found within the dictionary.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 321kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 197kUpdated Claude CodeCodexVerifiedInstall