Creation:2026-01-21Last update:2026-01-21
Reference this doc to your favorite AI assistantChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Unified documentation for all exports"v7.5.141/21/2026
Edit this doc
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
Copy doc Markdown to clipboard
useDictionary Hook Documentation
The useDictionary hook allows you to process an object that looks like a dictionary (containing keys and content) and handle translations, enumerations, etc., within it. Unlike useIntlayer, which is designed to work with generated dictionary declarations, useDictionary is more flexible and can be used with any object that follows the dictionary structure.
Usage
Description
The hook performing the following tasks:
- Locale Detection: It uses the current locale from the
IntlayerProvidercontext. - Translation Processing: it resolves the content based on the detected locale, processing any
t(),enu(), etc., definitions found within the object. - Flexible Content: It works directly with the object passed to it, making it ideal for dynamic content or objects that are not part of the standard pre-built dictionaries.