Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Document Solid 1 and Solid 2 support"v9.8.211/18/2026
- "Add usePathname utility"v10.0.06/23/2026
- "Unified documentation for all exports"v8.0.01/21/2026
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
solid-intlayer Package
The solid-intlayer package provides the necessary tools to integrate Intlayer into Solid applications. It includes providers and hooks for handling multilingual content.
It supports Solid 1.9 and Solid 2 from the same package: the installed solid-js version is detected at runtime, so no configuration is needed.
Installation
Copy the code to the clipboard
Exports
Provider
Import:
Copy the code to the clipboard
Open the table in a modal to view all data content clearly
| Component | Description | Related Doc |
|---|---|---|
IntlayerProvider | The main provider that wraps your application and provides the Intlayer context. | IntlayerProvider |
Hooks
Import:
Copy the code to the clipboard
Open the table in a modal to view all data content clearly
| Hook | Description | Related Doc |
|---|---|---|
useIntlayer | Based on useDictionary, but injects an optimized version of the dictionary from the generated declaration. | useIntlayer |
useDictionary | Processes objects that look like dictionaries (key, content). It processes t() translations, enumerations, etc. | - |
useDictionaryAsync | Same as useDictionary, but handles asynchronous dictionaries. | - |
useDictionaryDynamic | Same as useDictionary, but handles dynamic dictionaries. | - |
useLocale | Returns the current locale and a function to set it. | useLocale |
usePathname | Returns the current pathname as an Accessor<string> with the locale segment removed. Reactive to popstate. | usePathname |
useRewriteURL | Client-side hook to manage URL rewrites. Automatically updates the URL if a localized rewrite rule exists. | useRewriteURL |
useIntl | Returns the Intl object for the current locale. | - |
useLoadDynamic | Hook to load dynamic dictionaries. | - |
t | Picks content based on the current locale. | translation |
Components
Import:
Copy the code to the clipboard
Open the table in a modal to view all data content clearly
| Component | Description |
|---|---|
MarkdownProvider | Provider for markdown rendering context. |
