מחבר:
הפנו את עוזר ה-AI המועדף עליכם למסמך הזהChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Initial documentation"v8.0.030.1.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתעריכת המסמך הזה
אם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודנוצר:2026-01-30עדכון אחרון:2026-09-29
העתקה
העתקת ה-Markdown של המסמך ללוח
intlayer AdonisJS Middleware Documentation
The intlayer middleware for AdonisJS detects the user's locale and provides translation functions through the request context. It also enables the use of global translation functions within the request flow.
Usage
start/kernel.ts
העתקת קוד
העתקת הקוד ללוח
start/routes.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 Setup: It populates the request context with locale information.
Note: To use cookies for locale detection, ensure @adonisjs/cookie is configured and used in your application.