feat(i18n): add bilingual support (Català / Castellano) #41
Reference in New Issue
Block a user
Delete Branch "feat/i18n-bilingual-ca-es"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add lightweight i18n system using React Context + useTranslation hook.
No external dependencies. Language persisted in localStorage('ff-lang').
New files:
Modified 22 files:
ProfileView, AlertsView, ScannerView, PharmacyList, MedicineResults,
ProductResults, SavedNotifications, ErrorBoundary, SearchBar
MedicineManagement, PharmacyMedicineLink, PharmacyProductLink
ProfileView includes language selector (globe icon + modal CA/ES)
placed next to the Theme selector.
No routes changed. No API calls affected. No navigation changes.
Add lightweight i18n system using React Context + useTranslation hook. No external dependencies. Language persisted in localStorage('ff-lang'). New files: - src/i18n/locales/ca.js (~410 translation keys) - src/i18n/locales/es.js (~410 translation keys) - src/i18n/LanguageContext.jsx (Provider + t() function) - src/i18n/useTranslation.js (hook) - src/i18n/index.js (barrel export) Modified 22 files: - main.jsx: wrap App with LanguageProvider - App.test.jsx: add LanguageProvider wrapper for tests - 13 user components: BottomNav, HomeView, LoginModal, SearchView, ProfileView, AlertsView, ScannerView, PharmacyList, MedicineResults, ProductResults, SavedNotifications, ErrorBoundary, SearchBar - 6 admin components: AdminView, LoginForm, PharmacyManagement, MedicineManagement, PharmacyMedicineLink, PharmacyProductLink ProfileView includes language selector (globe icon + modal CA/ES) placed next to the Theme selector. No routes changed. No API calls affected. No navigation changes.Add lightweight i18n system matching the web app architecture. Language persisted in AsyncStorage('ff-lang'). New files: - src/i18n/locales/ca.js (~190 translation keys) - src/i18n/locales/es.js (~190 translation keys) - src/i18n/LanguageContext.jsx (Provider + AsyncStorage) - src/i18n/useTranslation.js (hook) - src/i18n/index.js (barrel export) Modified 16 files: - app/_layout.tsx: wrap with LanguageProvider, translate stack titles - app/(tabs)/_layout.tsx: translate tab bar labels - app/(tabs)/index.tsx: translate home screen - app/(tabs)/search.tsx: translate search screen - app/(tabs)/alerts.tsx: translate alerts screen - app/(tabs)/profile.tsx: translate profile + add language selector (CA/ES) - app/(tabs)/scan.tsx: translate scanner screen - app/auth/login.tsx: translate login/register - app/medicine/[id].tsx: translate medicine detail - app/pharmacy/[id].tsx: translate pharmacy detail - app/product/[source]/[id].tsx: translate product detail - 5 components: MedicineCard, StockBadge, SearchBar, LoadingSpinner, BarcodeScanner Language selector in Profile screen (globe icon + CA/ES toggle). No routes changed. No API calls affected.