i18n-railslove
✓ Published0🌍 Public
PP3nny
Last edited Dec 14, 2020
Created on Dec 14, 2020
This example demonstrates a React-based internationalization setup for a mobile app, showing how language resources are organized and loaded for seven locales (Arabic, German, English, Persian, French, Russian, and Turkish). It uses `i18next` combined with `react-i18next` and `expo-localization` to detect the system language and select the appropriate JSON resource files. The `i18next-parser` configuration automatically extracts translatable strings from JS/JSX source files, generating locale-specific JSON files with sorted keys. A custom `changeLanguage` function allows runtime language switching, while a fallback to English ensures robustness. The code also includes a script to check that all translations are clean and complete.
AI-generated description