שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Re-export the full react-intlayer API (hooks, utilities, format/html/markdown subpaths) so a React Native app only depends on react-native-intlayer"v9.0.025.6.2026
- "Unified documentation for all exports"v8.0.021.1.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתאם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודהעתקת ה-Markdown של המסמך ללוח
react-native-intlayer Package
The react-native-intlayer package provides the necessary tools to integrate Intlayer into React Native applications. It re-exports the full react-intlayer API (hooks and utilities) with a React Native-ready IntlayerProvider, plus the polyfills and Metro configuration required by React Native.
In a React Native app, import everything fromreact-native-intlayer. You do not need to install or importreact-intlayerdirectly.
Installation
העתקת הקוד ללוח
Exports
Provider
פתיחת הטבלה בחלון כדי לראות את כל תוכן הנתונים בבירור
| Component | Description |
|---|---|
IntlayerProvider | Provider component that wraps your application and provides the Intlayer context. Automatically applies the required polyfills. |
העתקת הקוד ללוח
Hooks and utilities
These are re-exported from react-intlayer, so you can import them straight from react-native-intlayer:
פתיחת הטבלה בחלון כדי לראות את כל תוכן הנתונים בבירור
| Export | Description |
|---|---|
useIntlayer | Access localized content for a dictionary key. |
useLocale | Read and change the current locale. |
useDictionary, useDictionaryAsync, useDictionaryDynamic, useLoadDynamic | Load dictionary content in various ways. |
useI18n | i18next-compatible hook. |
t | Inline translation helper. |
getIntlayer, getDictionary | Imperative content getters. |
localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage | Locale persistence helpers. |
העתקת הקוד ללוח
Polyfill
פתיחת הטבלה בחלון כדי לראות את כל תוכן הנתונים בבירור
| Function | Description |
|---|---|
intlayerPolyfill | Function that applies necessary polyfills for React Native to support Intlayer. |
העתקת הקוד ללוח
The polyfill is applied automatically when you importIntlayerProvider. CallintlayerPolyfillmanually only if you need the polyfills before the provider mounts.
Formatters
Number, date, and other Intl-based formatting hooks are available from the /format subpath:
העתקת הקוד ללוח
Markdown and HTML rendering
העתקת הקוד ללוח
Metro Configuration
The react-native-intlayer package provides Metro configuration utilities to ensure that Intlayer works correctly with React Native.
פתיחת הטבלה בחלון כדי לראות את כל תוכן הנתונים בבירור
| Function | Description |
|---|---|
configMetroIntlayer | Asynchronous function that prepares Intlayer and merges the Metro configuration. |
configMetroIntlayerSync | Synchronous function that merges the Metro configuration without preparing Intlayer resources. |
exclusionList | Creates a RegExp pattern for Metro's blockList to exclude content files from the bundle. |
העתקת הקוד ללוח
