अपने प्रश्न को पूछें और दस्तावेज़ का सारांश प्राप्त करें, इस पृष्ठ और आपके चुने हुए AI प्रदाता का उपयोग करके
संस्करण इतिहास
- "Init history"v9.0.013/6/2026
इस पृष्ठ की सामग्री एक AI द्वारा अनुवादित की गई है।
अंग्रेजी में मूल सामग्री के अंतिम संस्करण देखेंIf you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
Intlayer Compat Adapters
एक बड़े एप्लिकेशन को नई internationalization लाइब्रेरी में माइग्रेट करना चुनौतीपूर्ण हो सकता है। इस transition को आसान बनाने के लिए, Intlayer ecosystem में सबसे लोकप्रिय i18n लाइब्रेरीज के लिए compat adapters प्रदान करता है।
ये adapter packages आपकी मौजूदा i18n लाइब्रेरीज के बिल्कुल समान public API को expose करते हैं, लेकिन runtime पर सभी translation कार्य को Intlayer को delegate करते हैं।
यह कैसे काम करता है
जब आप एक compat adapter का उपयोग करते हैं, तो आपको अपने application के imports को फिर से लिखने या अपने translation hooks और components के उपयोग को बदलने की आवश्यकता नहीं होती है। इसके बजाय, Intlayer के bundler plugins स्वचालित रूप से आपके मौजूदा imports को Intlayer compat packages में alias करते हैं।
उदाहरण के लिए, एक developer import { useTranslation } from 'react-i18next' को import { useTranslation } from '@intlayer/react-i18next' से बदलता है (bundler plugin के माध्यम से स्वचालित रूप से किया जाता है), और app Intlayer dictionaries से serve किए जाने वाले translations के साथ काम करता रहता है। Keys को आपकी Intlayer dictionaries के विरुद्ध typed भी किया जाता है!
उपलब्ध Compat Adapters
अपनी मौजूदा लाइब्रेरी को नीचे चुनें और देखें कि seamlessly माइग्रेट कैसे करें: