מחבר:
הפנו את עוזר ה-AI המועדף עליכם למסמך הזהChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Init doc"v8.0.029.1.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתעריכת המסמך הזה
אם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודנוצר:2026-01-29עדכון אחרון:2026-09-29
העתקה
העתקת ה-Markdown של המסמך ללוח
intlayer Hono Middleware Documentation
The intlayer middleware for Hono detects the user's locale and populates the context object with Intlayer functions. It also enables the use of global translation functions within the request context.
Usage
ts
העתקת קוד
העתקת הקוד ללוח
Description
The middleware performs the following tasks:
- Locale Detection: It analyzes the request (headers, cookies, etc.) to determine the user's preferred locale.
- Context Population: It adds Intlayer data to the Hono context, accessible via
c.get(). This includes:locale: The detected locale.t: A translation function.getIntlayer: A function to retrieve dictionaries.getDictionary: A function to process dictionary objects.
