מחבר:
הפנו את עוזר ה-AI המועדף עליכם למסמך הזהChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Unified documentation for all exports"v8.0.021.1.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתעריכת המסמך הזה
אם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודנוצר:2026-01-21עדכון אחרון:2026-01-21
העתקה
העתקת ה-Markdown של המסמך ללוח
IntlayerProvider Component Documentation
The IntlayerProvider is the root component that provides the internationalization context to your Solid application. It manages the current locale state and ensures that all child components can access translations.
Usage
tsx
העתקת קוד
העתקת הקוד ללוח
Description
The IntlayerProvider performs the following roles:
- State Management: It initializes and stores the current locale, using signals for reactivity.
- Locale Resolution: It determines the initial locale based on cookies, browser preferences, or the default configuration.
- Context Injection: It makes the locale and the
setLocalefunction available to any component via hooks likeuseIntlayeroruseLocale. - Persistence: It automatically syncs locale changes with cookies or local storage to maintain the user's preference across sessions.
Props
- locale (optional): Manually set the current locale.
- defaultLocale (optional): Override the default locale from the configuration.
- setLocale (optional): Provide a custom locale setter function.
- disableEditor (optional): Disable the visual editor integration.
- isCookieEnabled (optional): Enable or disable cookie persistence.
