מחבר:
הפנו את עוזר ה-AI המועדף עליכם למסמך הזהChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Init doc"v8.0.021.1.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתעריכת המסמך הזה
אם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודנוצר:2026-01-21עדכון אחרון:2026-09-29
העתקה
העתקת ה-Markdown של המסמך ללוח
intlayer Fastify Plugin Documentation
The intlayer plugin for Fastify detects the user's locale and decorates the request object with Intlayer functions. It also enables the use of global translation functions within the request context.
Usage
ts
העתקת קוד
העתקת הקוד ללוח
Description
The plugin performs the following tasks:
- Locale Detection: It analyzes the request (headers, cookies, etc.) to determine the user's preferred locale.
- Request Decoration: It adds an
intlayerproperty to theFastifyRequestobject, containing:locale: The detected locale.t: A translation function.getIntlayer: A function to retrieve dictionaries.
