מחבר:
הפנו את עוזר ה-AI המועדף עליכם למסמך הזהChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Init doc"v9.5.519.9.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתעריכת המסמך הזה
אם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודנוצר:2026-09-19עדכון אחרון:2026-09-19
העתקה
העתקת ה-Markdown של המסמך ללוח
useDictionary Hook Documentation
The useDictionary hook transforms an imported or inline dictionary object and returns its content resolved for the current request's locale in Remix 3 applications.
Unlike useIntlayer, which resolves dictionaries by their string key from the global dictionary registry, useDictionary accepts a dictionary object directly.
Usage
src/views/home.ts
העתקת קוד
העתקת הקוד ללוח
You can also pass inline dictionaries defined with t():
ts
העתקת קוד
העתקת הקוד ללוח
Parameters
ts
העתקת קוד
העתקת הקוד ללוח
dictionary: A dictionary object or qualified dictionary group.localeOrSelector(optional): A specific locale or selector object ({ item },{ variant }, optionally withlocale). Takes precedence over the request locale if supplied.
Description
The hook performs the following tasks:
- Locale Detection: Reads the active request locale from the
AsyncLocalStoragestore created by theintlayer()middleware. - Content Resolution: Evaluates translations (
t()), enumerations, conditions, and nested structures according to the resolved locale. - Selector Processing: Applies any item or variant selectors specified in the arguments.
