---
createdAt: 2026-01-21
updatedAt: 2026-05-06
title: useIntlayer Hook Documentation | solid-intlayer
description: See how to use the useIntlayer hook for solid-intlayer package
keywords:
  - useIntlayer
  - dictionary
  - Intlayer
  - intlayer
  - Internationalization
  - Documentation
  - Solid
  - Solid.js
slugs:
  - doc
  - packages
  - solid-intlayer
  - useIntlayer
history:
  - version: 8.9.0
    date: 2026-05-04
    changes: "Update Solid useIntlayer API usage to direct property access"
  - version: 8.0.0
    date: 2026-01-21
    changes: "Unified documentation for all exports"
---

# useIntlayer Hook Documentation

The `useIntlayer` hook allows you to retrieve localized content from a dictionary using its key. In Solid, this hook returns reactive content that updates whenever the locale changes.

## Usage

```tsx
import { useIntlayer } from "solid-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. **Reactivity**: It returns reactive content that automatically updates when the global locale state changes.
4. **Translation Processing**: it resolves the content based on the detected locale, processing any `t()`, `enu()`, etc., definitions found within the dictionary.

## Parameters

- **key**: The unique key of the dictionary (as defined in your content declaration files).
- **locale** (optional): Override the current locale.

## Returns

Reactive content.
