@umituz/react-native-localization 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -6
- package/scripts/createLocaleLoaders.js +35 -28
- package/scripts/setup-languages.js +113 -0
- package/src/infrastructure/config/i18n.ts +2 -34
- package/src/infrastructure/config/languages.ts +0 -1
- package/src/infrastructure/locales/en-US/index.ts +33 -39
- package/src/infrastructure/storage/AsyncStorageWrapper.ts +1 -2
- package/src/infrastructure/storage/LocalizationStore.ts +0 -62
- package/lib/domain/repositories/ILocalizationRepository.d.ts +0 -17
- package/lib/domain/repositories/ILocalizationRepository.d.ts.map +0 -1
- package/lib/domain/repositories/ILocalizationRepository.js +0 -6
- package/lib/domain/repositories/ILocalizationRepository.js.map +0 -1
- package/lib/index.d.ts +0 -13
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -15
- package/lib/index.js.map +0 -1
- package/lib/infrastructure/components/LanguageSwitcher.d.ts +0 -12
- package/lib/infrastructure/components/LanguageSwitcher.d.ts.map +0 -1
- package/lib/infrastructure/components/LanguageSwitcher.js +0 -49
- package/lib/infrastructure/components/LanguageSwitcher.js.map +0 -1
- package/lib/infrastructure/components/LocalizationProvider.d.ts +0 -11
- package/lib/infrastructure/components/LocalizationProvider.d.ts.map +0 -1
- package/lib/infrastructure/components/LocalizationProvider.js +0 -14
- package/lib/infrastructure/components/LocalizationProvider.js.map +0 -1
- package/lib/infrastructure/components/useLanguageNavigation.d.ts +0 -6
- package/lib/infrastructure/components/useLanguageNavigation.d.ts.map +0 -1
- package/lib/infrastructure/components/useLanguageNavigation.js +0 -16
- package/lib/infrastructure/components/useLanguageNavigation.js.map +0 -1
- package/lib/infrastructure/config/i18n.d.ts +0 -12
- package/lib/infrastructure/config/i18n.d.ts.map +0 -1
- package/lib/infrastructure/config/i18n.js +0 -269
- package/lib/infrastructure/config/i18n.js.map +0 -1
- package/lib/infrastructure/config/languages.d.ts +0 -39
- package/lib/infrastructure/config/languages.d.ts.map +0 -1
- package/lib/infrastructure/config/languages.js +0 -210
- package/lib/infrastructure/config/languages.js.map +0 -1
- package/lib/infrastructure/config/languagesData.d.ts +0 -26
- package/lib/infrastructure/config/languagesData.d.ts.map +0 -1
- package/lib/infrastructure/config/languagesData.js +0 -58
- package/lib/infrastructure/config/languagesData.js.map +0 -1
- package/lib/infrastructure/locales/ar-SA/index.d.ts +0 -34
- package/lib/infrastructure/locales/ar-SA/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ar-SA/index.js +0 -47
- package/lib/infrastructure/locales/ar-SA/index.js.map +0 -1
- package/lib/infrastructure/locales/bg-BG/index.d.ts +0 -34
- package/lib/infrastructure/locales/bg-BG/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/bg-BG/index.js +0 -47
- package/lib/infrastructure/locales/bg-BG/index.js.map +0 -1
- package/lib/infrastructure/locales/cs-CZ/index.d.ts +0 -34
- package/lib/infrastructure/locales/cs-CZ/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/cs-CZ/index.js +0 -47
- package/lib/infrastructure/locales/cs-CZ/index.js.map +0 -1
- package/lib/infrastructure/locales/da-DK/index.d.ts +0 -34
- package/lib/infrastructure/locales/da-DK/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/da-DK/index.js +0 -47
- package/lib/infrastructure/locales/da-DK/index.js.map +0 -1
- package/lib/infrastructure/locales/de-DE/index.d.ts +0 -34
- package/lib/infrastructure/locales/de-DE/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/de-DE/index.js +0 -47
- package/lib/infrastructure/locales/de-DE/index.js.map +0 -1
- package/lib/infrastructure/locales/el-GR/index.d.ts +0 -34
- package/lib/infrastructure/locales/el-GR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/el-GR/index.js +0 -47
- package/lib/infrastructure/locales/el-GR/index.js.map +0 -1
- package/lib/infrastructure/locales/en-AU/index.d.ts +0 -32
- package/lib/infrastructure/locales/en-AU/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/en-AU/index.js +0 -44
- package/lib/infrastructure/locales/en-AU/index.js.map +0 -1
- package/lib/infrastructure/locales/en-CA/index.d.ts +0 -32
- package/lib/infrastructure/locales/en-CA/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/en-CA/index.js +0 -44
- package/lib/infrastructure/locales/en-CA/index.js.map +0 -1
- package/lib/infrastructure/locales/en-GB/index.d.ts +0 -32
- package/lib/infrastructure/locales/en-GB/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/en-GB/index.js +0 -44
- package/lib/infrastructure/locales/en-GB/index.js.map +0 -1
- package/lib/infrastructure/locales/en-US/index.d.ts +0 -34
- package/lib/infrastructure/locales/en-US/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/en-US/index.js +0 -47
- package/lib/infrastructure/locales/en-US/index.js.map +0 -1
- package/lib/infrastructure/locales/es-ES/index.d.ts +0 -34
- package/lib/infrastructure/locales/es-ES/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/es-ES/index.js +0 -47
- package/lib/infrastructure/locales/es-ES/index.js.map +0 -1
- package/lib/infrastructure/locales/es-MX/index.d.ts +0 -34
- package/lib/infrastructure/locales/es-MX/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/es-MX/index.js +0 -47
- package/lib/infrastructure/locales/es-MX/index.js.map +0 -1
- package/lib/infrastructure/locales/fi-FI/index.d.ts +0 -34
- package/lib/infrastructure/locales/fi-FI/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/fi-FI/index.js +0 -47
- package/lib/infrastructure/locales/fi-FI/index.js.map +0 -1
- package/lib/infrastructure/locales/fr-CA/index.d.ts +0 -34
- package/lib/infrastructure/locales/fr-CA/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/fr-CA/index.js +0 -47
- package/lib/infrastructure/locales/fr-CA/index.js.map +0 -1
- package/lib/infrastructure/locales/fr-FR/index.d.ts +0 -34
- package/lib/infrastructure/locales/fr-FR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/fr-FR/index.js +0 -47
- package/lib/infrastructure/locales/fr-FR/index.js.map +0 -1
- package/lib/infrastructure/locales/hi-IN/index.d.ts +0 -34
- package/lib/infrastructure/locales/hi-IN/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/hi-IN/index.js +0 -47
- package/lib/infrastructure/locales/hi-IN/index.js.map +0 -1
- package/lib/infrastructure/locales/hr-HR/index.d.ts +0 -34
- package/lib/infrastructure/locales/hr-HR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/hr-HR/index.js +0 -47
- package/lib/infrastructure/locales/hr-HR/index.js.map +0 -1
- package/lib/infrastructure/locales/hu-HU/index.d.ts +0 -34
- package/lib/infrastructure/locales/hu-HU/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/hu-HU/index.js +0 -47
- package/lib/infrastructure/locales/hu-HU/index.js.map +0 -1
- package/lib/infrastructure/locales/id-ID/index.d.ts +0 -34
- package/lib/infrastructure/locales/id-ID/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/id-ID/index.js +0 -47
- package/lib/infrastructure/locales/id-ID/index.js.map +0 -1
- package/lib/infrastructure/locales/it-IT/index.d.ts +0 -34
- package/lib/infrastructure/locales/it-IT/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/it-IT/index.js +0 -47
- package/lib/infrastructure/locales/it-IT/index.js.map +0 -1
- package/lib/infrastructure/locales/ja-JP/index.d.ts +0 -34
- package/lib/infrastructure/locales/ja-JP/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ja-JP/index.js +0 -47
- package/lib/infrastructure/locales/ja-JP/index.js.map +0 -1
- package/lib/infrastructure/locales/ko-KR/index.d.ts +0 -34
- package/lib/infrastructure/locales/ko-KR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ko-KR/index.js +0 -47
- package/lib/infrastructure/locales/ko-KR/index.js.map +0 -1
- package/lib/infrastructure/locales/ms-MY/index.d.ts +0 -34
- package/lib/infrastructure/locales/ms-MY/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ms-MY/index.js +0 -47
- package/lib/infrastructure/locales/ms-MY/index.js.map +0 -1
- package/lib/infrastructure/locales/nl-NL/index.d.ts +0 -34
- package/lib/infrastructure/locales/nl-NL/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/nl-NL/index.js +0 -47
- package/lib/infrastructure/locales/nl-NL/index.js.map +0 -1
- package/lib/infrastructure/locales/no-NO/index.d.ts +0 -34
- package/lib/infrastructure/locales/no-NO/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/no-NO/index.js +0 -47
- package/lib/infrastructure/locales/no-NO/index.js.map +0 -1
- package/lib/infrastructure/locales/pl-PL/index.d.ts +0 -34
- package/lib/infrastructure/locales/pl-PL/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/pl-PL/index.js +0 -47
- package/lib/infrastructure/locales/pl-PL/index.js.map +0 -1
- package/lib/infrastructure/locales/pt-BR/index.d.ts +0 -34
- package/lib/infrastructure/locales/pt-BR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/pt-BR/index.js +0 -47
- package/lib/infrastructure/locales/pt-BR/index.js.map +0 -1
- package/lib/infrastructure/locales/pt-PT/index.d.ts +0 -34
- package/lib/infrastructure/locales/pt-PT/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/pt-PT/index.js +0 -47
- package/lib/infrastructure/locales/pt-PT/index.js.map +0 -1
- package/lib/infrastructure/locales/ro-RO/index.d.ts +0 -34
- package/lib/infrastructure/locales/ro-RO/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ro-RO/index.js +0 -47
- package/lib/infrastructure/locales/ro-RO/index.js.map +0 -1
- package/lib/infrastructure/locales/ru-RU/index.d.ts +0 -34
- package/lib/infrastructure/locales/ru-RU/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/ru-RU/index.js +0 -47
- package/lib/infrastructure/locales/ru-RU/index.js.map +0 -1
- package/lib/infrastructure/locales/sk-SK/index.d.ts +0 -34
- package/lib/infrastructure/locales/sk-SK/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/sk-SK/index.js +0 -47
- package/lib/infrastructure/locales/sk-SK/index.js.map +0 -1
- package/lib/infrastructure/locales/sv-SE/index.d.ts +0 -34
- package/lib/infrastructure/locales/sv-SE/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/sv-SE/index.js +0 -47
- package/lib/infrastructure/locales/sv-SE/index.js.map +0 -1
- package/lib/infrastructure/locales/th-TH/index.d.ts +0 -34
- package/lib/infrastructure/locales/th-TH/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/th-TH/index.js +0 -47
- package/lib/infrastructure/locales/th-TH/index.js.map +0 -1
- package/lib/infrastructure/locales/tl-PH/index.d.ts +0 -34
- package/lib/infrastructure/locales/tl-PH/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/tl-PH/index.js +0 -47
- package/lib/infrastructure/locales/tl-PH/index.js.map +0 -1
- package/lib/infrastructure/locales/tr-TR/index.d.ts +0 -34
- package/lib/infrastructure/locales/tr-TR/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/tr-TR/index.js +0 -47
- package/lib/infrastructure/locales/tr-TR/index.js.map +0 -1
- package/lib/infrastructure/locales/uk-UA/index.d.ts +0 -34
- package/lib/infrastructure/locales/uk-UA/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/uk-UA/index.js +0 -47
- package/lib/infrastructure/locales/uk-UA/index.js.map +0 -1
- package/lib/infrastructure/locales/vi-VN/index.d.ts +0 -34
- package/lib/infrastructure/locales/vi-VN/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/vi-VN/index.js +0 -47
- package/lib/infrastructure/locales/vi-VN/index.js.map +0 -1
- package/lib/infrastructure/locales/zh-CN/index.d.ts +0 -34
- package/lib/infrastructure/locales/zh-CN/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/zh-CN/index.js +0 -47
- package/lib/infrastructure/locales/zh-CN/index.js.map +0 -1
- package/lib/infrastructure/locales/zh-TW/index.d.ts +0 -34
- package/lib/infrastructure/locales/zh-TW/index.d.ts.map +0 -1
- package/lib/infrastructure/locales/zh-TW/index.js +0 -47
- package/lib/infrastructure/locales/zh-TW/index.js.map +0 -1
- package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts +0 -12
- package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts.map +0 -1
- package/lib/infrastructure/storage/AsyncStorageWrapper.js +0 -29
- package/lib/infrastructure/storage/AsyncStorageWrapper.js.map +0 -1
- package/lib/infrastructure/storage/LocalizationStore.d.ts +0 -31
- package/lib/infrastructure/storage/LocalizationStore.d.ts.map +0 -1
- package/lib/infrastructure/storage/LocalizationStore.js +0 -192
- package/lib/infrastructure/storage/LocalizationStore.js.map +0 -1
- package/src/infrastructure/locales/ar-SA/auth.json +0 -32
- package/src/infrastructure/locales/ar-SA/branding.json +0 -9
- package/src/infrastructure/locales/ar-SA/datetime.json +0 -140
- package/src/infrastructure/locales/ar-SA/errors.json +0 -43
- package/src/infrastructure/locales/ar-SA/flashcards.json +0 -287
- package/src/infrastructure/locales/ar-SA/general.json +0 -61
- package/src/infrastructure/locales/ar-SA/index.ts +0 -49
- package/src/infrastructure/locales/ar-SA/navigation.json +0 -58
- package/src/infrastructure/locales/ar-SA/onboarding.json +0 -76
- package/src/infrastructure/locales/ar-SA/settings.json +0 -53
- package/src/infrastructure/locales/bg-BG/auth.json +0 -32
- package/src/infrastructure/locales/bg-BG/branding.json +0 -9
- package/src/infrastructure/locales/bg-BG/datetime.json +0 -140
- package/src/infrastructure/locales/bg-BG/errors.json +0 -43
- package/src/infrastructure/locales/bg-BG/flashcards.json +0 -287
- package/src/infrastructure/locales/bg-BG/general.json +0 -61
- package/src/infrastructure/locales/bg-BG/index.ts +0 -49
- package/src/infrastructure/locales/bg-BG/navigation.json +0 -58
- package/src/infrastructure/locales/bg-BG/onboarding.json +0 -76
- package/src/infrastructure/locales/bg-BG/settings.json +0 -53
- package/src/infrastructure/locales/cs-CZ/auth.json +0 -32
- package/src/infrastructure/locales/cs-CZ/branding.json +0 -9
- package/src/infrastructure/locales/cs-CZ/datetime.json +0 -140
- package/src/infrastructure/locales/cs-CZ/errors.json +0 -43
- package/src/infrastructure/locales/cs-CZ/flashcards.json +0 -287
- package/src/infrastructure/locales/cs-CZ/general.json +0 -61
- package/src/infrastructure/locales/cs-CZ/index.ts +0 -49
- package/src/infrastructure/locales/cs-CZ/navigation.json +0 -58
- package/src/infrastructure/locales/cs-CZ/onboarding.json +0 -76
- package/src/infrastructure/locales/cs-CZ/settings.json +0 -53
- package/src/infrastructure/locales/da-DK/auth.json +0 -32
- package/src/infrastructure/locales/da-DK/branding.json +0 -9
- package/src/infrastructure/locales/da-DK/datetime.json +0 -140
- package/src/infrastructure/locales/da-DK/errors.json +0 -43
- package/src/infrastructure/locales/da-DK/flashcards.json +0 -287
- package/src/infrastructure/locales/da-DK/general.json +0 -61
- package/src/infrastructure/locales/da-DK/index.ts +0 -49
- package/src/infrastructure/locales/da-DK/navigation.json +0 -58
- package/src/infrastructure/locales/da-DK/onboarding.json +0 -76
- package/src/infrastructure/locales/da-DK/settings.json +0 -53
- package/src/infrastructure/locales/de-DE/auth.json +0 -32
- package/src/infrastructure/locales/de-DE/branding.json +0 -9
- package/src/infrastructure/locales/de-DE/datetime.json +0 -140
- package/src/infrastructure/locales/de-DE/errors.json +0 -43
- package/src/infrastructure/locales/de-DE/flashcards.json +0 -287
- package/src/infrastructure/locales/de-DE/general.json +0 -61
- package/src/infrastructure/locales/de-DE/index.ts +0 -49
- package/src/infrastructure/locales/de-DE/navigation.json +0 -58
- package/src/infrastructure/locales/de-DE/onboarding.json +0 -76
- package/src/infrastructure/locales/de-DE/settings.json +0 -53
- package/src/infrastructure/locales/el-GR/auth.json +0 -32
- package/src/infrastructure/locales/el-GR/branding.json +0 -9
- package/src/infrastructure/locales/el-GR/datetime.json +0 -140
- package/src/infrastructure/locales/el-GR/errors.json +0 -43
- package/src/infrastructure/locales/el-GR/flashcards.json +0 -287
- package/src/infrastructure/locales/el-GR/general.json +0 -61
- package/src/infrastructure/locales/el-GR/index.ts +0 -49
- package/src/infrastructure/locales/el-GR/navigation.json +0 -58
- package/src/infrastructure/locales/el-GR/onboarding.json +0 -76
- package/src/infrastructure/locales/el-GR/settings.json +0 -53
- package/src/infrastructure/locales/en-AU/branding.json +0 -11
- package/src/infrastructure/locales/en-AU/datetime.json +0 -140
- package/src/infrastructure/locales/en-AU/errors.json +0 -43
- package/src/infrastructure/locales/en-AU/flashcards.json +0 -83
- package/src/infrastructure/locales/en-AU/general.json +0 -61
- package/src/infrastructure/locales/en-AU/index.ts +0 -46
- package/src/infrastructure/locales/en-AU/navigation.json +0 -58
- package/src/infrastructure/locales/en-AU/onboarding.json +0 -76
- package/src/infrastructure/locales/en-AU/settings.json +0 -53
- package/src/infrastructure/locales/en-CA/branding.json +0 -11
- package/src/infrastructure/locales/en-CA/datetime.json +0 -140
- package/src/infrastructure/locales/en-CA/errors.json +0 -43
- package/src/infrastructure/locales/en-CA/flashcards.json +0 -83
- package/src/infrastructure/locales/en-CA/general.json +0 -61
- package/src/infrastructure/locales/en-CA/index.ts +0 -46
- package/src/infrastructure/locales/en-CA/navigation.json +0 -58
- package/src/infrastructure/locales/en-CA/onboarding.json +0 -76
- package/src/infrastructure/locales/en-CA/settings.json +0 -53
- package/src/infrastructure/locales/en-GB/branding.json +0 -11
- package/src/infrastructure/locales/en-GB/datetime.json +0 -140
- package/src/infrastructure/locales/en-GB/errors.json +0 -43
- package/src/infrastructure/locales/en-GB/flashcards.json +0 -83
- package/src/infrastructure/locales/en-GB/general.json +0 -61
- package/src/infrastructure/locales/en-GB/index.ts +0 -46
- package/src/infrastructure/locales/en-GB/navigation.json +0 -58
- package/src/infrastructure/locales/en-GB/onboarding.json +0 -76
- package/src/infrastructure/locales/en-GB/settings.json +0 -53
- package/src/infrastructure/locales/es-ES/auth.json +0 -32
- package/src/infrastructure/locales/es-ES/branding.json +0 -9
- package/src/infrastructure/locales/es-ES/datetime.json +0 -140
- package/src/infrastructure/locales/es-ES/errors.json +0 -43
- package/src/infrastructure/locales/es-ES/flashcards.json +0 -287
- package/src/infrastructure/locales/es-ES/general.json +0 -61
- package/src/infrastructure/locales/es-ES/index.ts +0 -49
- package/src/infrastructure/locales/es-ES/navigation.json +0 -58
- package/src/infrastructure/locales/es-ES/onboarding.json +0 -76
- package/src/infrastructure/locales/es-ES/settings.json +0 -53
- package/src/infrastructure/locales/es-MX/auth.json +0 -32
- package/src/infrastructure/locales/es-MX/branding.json +0 -9
- package/src/infrastructure/locales/es-MX/datetime.json +0 -140
- package/src/infrastructure/locales/es-MX/errors.json +0 -43
- package/src/infrastructure/locales/es-MX/flashcards.json +0 -276
- package/src/infrastructure/locales/es-MX/general.json +0 -61
- package/src/infrastructure/locales/es-MX/index.ts +0 -49
- package/src/infrastructure/locales/es-MX/navigation.json +0 -58
- package/src/infrastructure/locales/es-MX/onboarding.json +0 -76
- package/src/infrastructure/locales/es-MX/settings.json +0 -53
- package/src/infrastructure/locales/fi-FI/auth.json +0 -32
- package/src/infrastructure/locales/fi-FI/branding.json +0 -9
- package/src/infrastructure/locales/fi-FI/datetime.json +0 -140
- package/src/infrastructure/locales/fi-FI/errors.json +0 -43
- package/src/infrastructure/locales/fi-FI/flashcards.json +0 -287
- package/src/infrastructure/locales/fi-FI/general.json +0 -61
- package/src/infrastructure/locales/fi-FI/index.ts +0 -49
- package/src/infrastructure/locales/fi-FI/navigation.json +0 -58
- package/src/infrastructure/locales/fi-FI/onboarding.json +0 -76
- package/src/infrastructure/locales/fi-FI/settings.json +0 -53
- package/src/infrastructure/locales/fr-CA/auth.json +0 -32
- package/src/infrastructure/locales/fr-CA/branding.json +0 -9
- package/src/infrastructure/locales/fr-CA/datetime.json +0 -140
- package/src/infrastructure/locales/fr-CA/errors.json +0 -43
- package/src/infrastructure/locales/fr-CA/flashcards.json +0 -287
- package/src/infrastructure/locales/fr-CA/general.json +0 -61
- package/src/infrastructure/locales/fr-CA/index.ts +0 -49
- package/src/infrastructure/locales/fr-CA/navigation.json +0 -58
- package/src/infrastructure/locales/fr-CA/onboarding.json +0 -76
- package/src/infrastructure/locales/fr-CA/settings.json +0 -53
- package/src/infrastructure/locales/fr-FR/auth.json +0 -32
- package/src/infrastructure/locales/fr-FR/branding.json +0 -9
- package/src/infrastructure/locales/fr-FR/datetime.json +0 -140
- package/src/infrastructure/locales/fr-FR/errors.json +0 -43
- package/src/infrastructure/locales/fr-FR/flashcards.json +0 -287
- package/src/infrastructure/locales/fr-FR/general.json +0 -61
- package/src/infrastructure/locales/fr-FR/index.ts +0 -49
- package/src/infrastructure/locales/fr-FR/navigation.json +0 -58
- package/src/infrastructure/locales/fr-FR/onboarding.json +0 -76
- package/src/infrastructure/locales/fr-FR/settings.json +0 -53
- package/src/infrastructure/locales/hi-IN/auth.json +0 -32
- package/src/infrastructure/locales/hi-IN/branding.json +0 -9
- package/src/infrastructure/locales/hi-IN/datetime.json +0 -140
- package/src/infrastructure/locales/hi-IN/errors.json +0 -43
- package/src/infrastructure/locales/hi-IN/flashcards.json +0 -287
- package/src/infrastructure/locales/hi-IN/general.json +0 -61
- package/src/infrastructure/locales/hi-IN/index.ts +0 -49
- package/src/infrastructure/locales/hi-IN/navigation.json +0 -58
- package/src/infrastructure/locales/hi-IN/onboarding.json +0 -76
- package/src/infrastructure/locales/hi-IN/settings.json +0 -53
- package/src/infrastructure/locales/hr-HR/auth.json +0 -32
- package/src/infrastructure/locales/hr-HR/branding.json +0 -9
- package/src/infrastructure/locales/hr-HR/datetime.json +0 -140
- package/src/infrastructure/locales/hr-HR/errors.json +0 -43
- package/src/infrastructure/locales/hr-HR/flashcards.json +0 -276
- package/src/infrastructure/locales/hr-HR/general.json +0 -61
- package/src/infrastructure/locales/hr-HR/index.ts +0 -49
- package/src/infrastructure/locales/hr-HR/navigation.json +0 -58
- package/src/infrastructure/locales/hr-HR/onboarding.json +0 -76
- package/src/infrastructure/locales/hr-HR/settings.json +0 -53
- package/src/infrastructure/locales/hu-HU/auth.json +0 -32
- package/src/infrastructure/locales/hu-HU/branding.json +0 -9
- package/src/infrastructure/locales/hu-HU/datetime.json +0 -140
- package/src/infrastructure/locales/hu-HU/errors.json +0 -43
- package/src/infrastructure/locales/hu-HU/flashcards.json +0 -287
- package/src/infrastructure/locales/hu-HU/general.json +0 -61
- package/src/infrastructure/locales/hu-HU/index.ts +0 -49
- package/src/infrastructure/locales/hu-HU/navigation.json +0 -58
- package/src/infrastructure/locales/hu-HU/onboarding.json +0 -76
- package/src/infrastructure/locales/hu-HU/settings.json +0 -53
- package/src/infrastructure/locales/id-ID/auth.json +0 -32
- package/src/infrastructure/locales/id-ID/branding.json +0 -9
- package/src/infrastructure/locales/id-ID/datetime.json +0 -140
- package/src/infrastructure/locales/id-ID/errors.json +0 -43
- package/src/infrastructure/locales/id-ID/flashcards.json +0 -287
- package/src/infrastructure/locales/id-ID/general.json +0 -61
- package/src/infrastructure/locales/id-ID/index.ts +0 -49
- package/src/infrastructure/locales/id-ID/navigation.json +0 -58
- package/src/infrastructure/locales/id-ID/onboarding.json +0 -76
- package/src/infrastructure/locales/id-ID/settings.json +0 -53
- package/src/infrastructure/locales/it-IT/auth.json +0 -32
- package/src/infrastructure/locales/it-IT/branding.json +0 -9
- package/src/infrastructure/locales/it-IT/datetime.json +0 -140
- package/src/infrastructure/locales/it-IT/errors.json +0 -43
- package/src/infrastructure/locales/it-IT/flashcards.json +0 -287
- package/src/infrastructure/locales/it-IT/general.json +0 -61
- package/src/infrastructure/locales/it-IT/index.ts +0 -49
- package/src/infrastructure/locales/it-IT/navigation.json +0 -58
- package/src/infrastructure/locales/it-IT/onboarding.json +0 -76
- package/src/infrastructure/locales/it-IT/settings.json +0 -53
- package/src/infrastructure/locales/ja-JP/auth.json +0 -32
- package/src/infrastructure/locales/ja-JP/branding.json +0 -9
- package/src/infrastructure/locales/ja-JP/datetime.json +0 -140
- package/src/infrastructure/locales/ja-JP/errors.json +0 -43
- package/src/infrastructure/locales/ja-JP/flashcards.json +0 -287
- package/src/infrastructure/locales/ja-JP/general.json +0 -61
- package/src/infrastructure/locales/ja-JP/index.ts +0 -49
- package/src/infrastructure/locales/ja-JP/navigation.json +0 -58
- package/src/infrastructure/locales/ja-JP/onboarding.json +0 -76
- package/src/infrastructure/locales/ja-JP/settings.json +0 -53
- package/src/infrastructure/locales/ko-KR/auth.json +0 -32
- package/src/infrastructure/locales/ko-KR/branding.json +0 -9
- package/src/infrastructure/locales/ko-KR/datetime.json +0 -140
- package/src/infrastructure/locales/ko-KR/errors.json +0 -43
- package/src/infrastructure/locales/ko-KR/flashcards.json +0 -287
- package/src/infrastructure/locales/ko-KR/general.json +0 -61
- package/src/infrastructure/locales/ko-KR/index.ts +0 -49
- package/src/infrastructure/locales/ko-KR/navigation.json +0 -58
- package/src/infrastructure/locales/ko-KR/onboarding.json +0 -76
- package/src/infrastructure/locales/ko-KR/settings.json +0 -53
- package/src/infrastructure/locales/ms-MY/auth.json +0 -32
- package/src/infrastructure/locales/ms-MY/branding.json +0 -9
- package/src/infrastructure/locales/ms-MY/datetime.json +0 -140
- package/src/infrastructure/locales/ms-MY/errors.json +0 -43
- package/src/infrastructure/locales/ms-MY/flashcards.json +0 -287
- package/src/infrastructure/locales/ms-MY/general.json +0 -61
- package/src/infrastructure/locales/ms-MY/index.ts +0 -49
- package/src/infrastructure/locales/ms-MY/navigation.json +0 -58
- package/src/infrastructure/locales/ms-MY/onboarding.json +0 -76
- package/src/infrastructure/locales/ms-MY/settings.json +0 -53
- package/src/infrastructure/locales/nl-NL/auth.json +0 -32
- package/src/infrastructure/locales/nl-NL/branding.json +0 -9
- package/src/infrastructure/locales/nl-NL/datetime.json +0 -140
- package/src/infrastructure/locales/nl-NL/errors.json +0 -43
- package/src/infrastructure/locales/nl-NL/flashcards.json +0 -287
- package/src/infrastructure/locales/nl-NL/general.json +0 -61
- package/src/infrastructure/locales/nl-NL/index.ts +0 -49
- package/src/infrastructure/locales/nl-NL/navigation.json +0 -58
- package/src/infrastructure/locales/nl-NL/onboarding.json +0 -76
- package/src/infrastructure/locales/nl-NL/settings.json +0 -53
- package/src/infrastructure/locales/no-NO/auth.json +0 -32
- package/src/infrastructure/locales/no-NO/branding.json +0 -9
- package/src/infrastructure/locales/no-NO/datetime.json +0 -140
- package/src/infrastructure/locales/no-NO/errors.json +0 -43
- package/src/infrastructure/locales/no-NO/flashcards.json +0 -287
- package/src/infrastructure/locales/no-NO/general.json +0 -61
- package/src/infrastructure/locales/no-NO/index.ts +0 -49
- package/src/infrastructure/locales/no-NO/navigation.json +0 -58
- package/src/infrastructure/locales/no-NO/onboarding.json +0 -76
- package/src/infrastructure/locales/no-NO/settings.json +0 -53
- package/src/infrastructure/locales/pl-PL/auth.json +0 -32
- package/src/infrastructure/locales/pl-PL/branding.json +0 -9
- package/src/infrastructure/locales/pl-PL/datetime.json +0 -140
- package/src/infrastructure/locales/pl-PL/errors.json +0 -43
- package/src/infrastructure/locales/pl-PL/flashcards.json +0 -287
- package/src/infrastructure/locales/pl-PL/general.json +0 -61
- package/src/infrastructure/locales/pl-PL/index.ts +0 -49
- package/src/infrastructure/locales/pl-PL/navigation.json +0 -58
- package/src/infrastructure/locales/pl-PL/onboarding.json +0 -76
- package/src/infrastructure/locales/pl-PL/settings.json +0 -53
- package/src/infrastructure/locales/pt-BR/auth.json +0 -32
- package/src/infrastructure/locales/pt-BR/branding.json +0 -9
- package/src/infrastructure/locales/pt-BR/datetime.json +0 -140
- package/src/infrastructure/locales/pt-BR/errors.json +0 -43
- package/src/infrastructure/locales/pt-BR/flashcards.json +0 -287
- package/src/infrastructure/locales/pt-BR/general.json +0 -61
- package/src/infrastructure/locales/pt-BR/index.ts +0 -49
- package/src/infrastructure/locales/pt-BR/navigation.json +0 -58
- package/src/infrastructure/locales/pt-BR/onboarding.json +0 -76
- package/src/infrastructure/locales/pt-BR/settings.json +0 -53
- package/src/infrastructure/locales/pt-PT/auth.json +0 -32
- package/src/infrastructure/locales/pt-PT/branding.json +0 -9
- package/src/infrastructure/locales/pt-PT/datetime.json +0 -140
- package/src/infrastructure/locales/pt-PT/errors.json +0 -43
- package/src/infrastructure/locales/pt-PT/flashcards.json +0 -287
- package/src/infrastructure/locales/pt-PT/general.json +0 -61
- package/src/infrastructure/locales/pt-PT/index.ts +0 -49
- package/src/infrastructure/locales/pt-PT/navigation.json +0 -58
- package/src/infrastructure/locales/pt-PT/onboarding.json +0 -76
- package/src/infrastructure/locales/pt-PT/settings.json +0 -53
- package/src/infrastructure/locales/ro-RO/auth.json +0 -32
- package/src/infrastructure/locales/ro-RO/branding.json +0 -9
- package/src/infrastructure/locales/ro-RO/datetime.json +0 -140
- package/src/infrastructure/locales/ro-RO/errors.json +0 -43
- package/src/infrastructure/locales/ro-RO/flashcards.json +0 -287
- package/src/infrastructure/locales/ro-RO/general.json +0 -61
- package/src/infrastructure/locales/ro-RO/index.ts +0 -49
- package/src/infrastructure/locales/ro-RO/navigation.json +0 -58
- package/src/infrastructure/locales/ro-RO/onboarding.json +0 -76
- package/src/infrastructure/locales/ro-RO/settings.json +0 -53
- package/src/infrastructure/locales/ru-RU/auth.json +0 -32
- package/src/infrastructure/locales/ru-RU/branding.json +0 -9
- package/src/infrastructure/locales/ru-RU/datetime.json +0 -140
- package/src/infrastructure/locales/ru-RU/errors.json +0 -43
- package/src/infrastructure/locales/ru-RU/flashcards.json +0 -276
- package/src/infrastructure/locales/ru-RU/general.json +0 -61
- package/src/infrastructure/locales/ru-RU/index.ts +0 -49
- package/src/infrastructure/locales/ru-RU/navigation.json +0 -58
- package/src/infrastructure/locales/ru-RU/onboarding.json +0 -76
- package/src/infrastructure/locales/ru-RU/settings.json +0 -53
- package/src/infrastructure/locales/sk-SK/auth.json +0 -32
- package/src/infrastructure/locales/sk-SK/branding.json +0 -9
- package/src/infrastructure/locales/sk-SK/datetime.json +0 -140
- package/src/infrastructure/locales/sk-SK/errors.json +0 -43
- package/src/infrastructure/locales/sk-SK/flashcards.json +0 -287
- package/src/infrastructure/locales/sk-SK/general.json +0 -61
- package/src/infrastructure/locales/sk-SK/index.ts +0 -49
- package/src/infrastructure/locales/sk-SK/navigation.json +0 -58
- package/src/infrastructure/locales/sk-SK/onboarding.json +0 -76
- package/src/infrastructure/locales/sk-SK/settings.json +0 -53
- package/src/infrastructure/locales/sv-SE/auth.json +0 -32
- package/src/infrastructure/locales/sv-SE/branding.json +0 -9
- package/src/infrastructure/locales/sv-SE/datetime.json +0 -140
- package/src/infrastructure/locales/sv-SE/errors.json +0 -43
- package/src/infrastructure/locales/sv-SE/flashcards.json +0 -287
- package/src/infrastructure/locales/sv-SE/general.json +0 -61
- package/src/infrastructure/locales/sv-SE/index.ts +0 -49
- package/src/infrastructure/locales/sv-SE/navigation.json +0 -58
- package/src/infrastructure/locales/sv-SE/onboarding.json +0 -76
- package/src/infrastructure/locales/sv-SE/settings.json +0 -53
- package/src/infrastructure/locales/th-TH/auth.json +0 -32
- package/src/infrastructure/locales/th-TH/branding.json +0 -9
- package/src/infrastructure/locales/th-TH/datetime.json +0 -140
- package/src/infrastructure/locales/th-TH/errors.json +0 -43
- package/src/infrastructure/locales/th-TH/flashcards.json +0 -287
- package/src/infrastructure/locales/th-TH/general.json +0 -61
- package/src/infrastructure/locales/th-TH/index.ts +0 -49
- package/src/infrastructure/locales/th-TH/navigation.json +0 -58
- package/src/infrastructure/locales/th-TH/onboarding.json +0 -76
- package/src/infrastructure/locales/th-TH/settings.json +0 -53
- package/src/infrastructure/locales/tl-PH/auth.json +0 -32
- package/src/infrastructure/locales/tl-PH/branding.json +0 -9
- package/src/infrastructure/locales/tl-PH/datetime.json +0 -140
- package/src/infrastructure/locales/tl-PH/errors.json +0 -43
- package/src/infrastructure/locales/tl-PH/flashcards.json +0 -287
- package/src/infrastructure/locales/tl-PH/general.json +0 -61
- package/src/infrastructure/locales/tl-PH/index.ts +0 -49
- package/src/infrastructure/locales/tl-PH/navigation.json +0 -58
- package/src/infrastructure/locales/tl-PH/onboarding.json +0 -76
- package/src/infrastructure/locales/tl-PH/settings.json +0 -53
- package/src/infrastructure/locales/tr-TR/auth.json +0 -32
- package/src/infrastructure/locales/tr-TR/branding.json +0 -9
- package/src/infrastructure/locales/tr-TR/datetime.json +0 -140
- package/src/infrastructure/locales/tr-TR/errors.json +0 -43
- package/src/infrastructure/locales/tr-TR/flashcards.json +0 -287
- package/src/infrastructure/locales/tr-TR/general.json +0 -61
- package/src/infrastructure/locales/tr-TR/index.ts +0 -49
- package/src/infrastructure/locales/tr-TR/navigation.json +0 -58
- package/src/infrastructure/locales/tr-TR/onboarding.json +0 -76
- package/src/infrastructure/locales/tr-TR/settings.json +0 -53
- package/src/infrastructure/locales/uk-UA/auth.json +0 -32
- package/src/infrastructure/locales/uk-UA/branding.json +0 -9
- package/src/infrastructure/locales/uk-UA/datetime.json +0 -140
- package/src/infrastructure/locales/uk-UA/errors.json +0 -43
- package/src/infrastructure/locales/uk-UA/flashcards.json +0 -287
- package/src/infrastructure/locales/uk-UA/general.json +0 -61
- package/src/infrastructure/locales/uk-UA/index.ts +0 -49
- package/src/infrastructure/locales/uk-UA/navigation.json +0 -58
- package/src/infrastructure/locales/uk-UA/onboarding.json +0 -76
- package/src/infrastructure/locales/uk-UA/settings.json +0 -53
- package/src/infrastructure/locales/vi-VN/auth.json +0 -32
- package/src/infrastructure/locales/vi-VN/branding.json +0 -9
- package/src/infrastructure/locales/vi-VN/datetime.json +0 -140
- package/src/infrastructure/locales/vi-VN/errors.json +0 -43
- package/src/infrastructure/locales/vi-VN/flashcards.json +0 -287
- package/src/infrastructure/locales/vi-VN/general.json +0 -61
- package/src/infrastructure/locales/vi-VN/index.ts +0 -49
- package/src/infrastructure/locales/vi-VN/navigation.json +0 -58
- package/src/infrastructure/locales/vi-VN/onboarding.json +0 -76
- package/src/infrastructure/locales/vi-VN/settings.json +0 -53
- package/src/infrastructure/locales/zh-CN/auth.json +0 -32
- package/src/infrastructure/locales/zh-CN/branding.json +0 -9
- package/src/infrastructure/locales/zh-CN/datetime.json +0 -140
- package/src/infrastructure/locales/zh-CN/errors.json +0 -43
- package/src/infrastructure/locales/zh-CN/flashcards.json +0 -287
- package/src/infrastructure/locales/zh-CN/general.json +0 -61
- package/src/infrastructure/locales/zh-CN/index.ts +0 -49
- package/src/infrastructure/locales/zh-CN/navigation.json +0 -58
- package/src/infrastructure/locales/zh-CN/onboarding.json +0 -76
- package/src/infrastructure/locales/zh-CN/settings.json +0 -53
- package/src/infrastructure/locales/zh-TW/auth.json +0 -32
- package/src/infrastructure/locales/zh-TW/branding.json +0 -9
- package/src/infrastructure/locales/zh-TW/datetime.json +0 -140
- package/src/infrastructure/locales/zh-TW/errors.json +0 -43
- package/src/infrastructure/locales/zh-TW/flashcards.json +0 -287
- package/src/infrastructure/locales/zh-TW/general.json +0 -61
- package/src/infrastructure/locales/zh-TW/index.ts +0 -49
- package/src/infrastructure/locales/zh-TW/navigation.json +0 -58
- package/src/infrastructure/locales/zh-TW/onboarding.json +0 -76
- package/src/infrastructure/locales/zh-TW/settings.json +0 -53
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/components/LanguageSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAQD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwC5D,CAAC;AAqBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TouchableOpacity, Text, StyleSheet } from 'react-native';
|
|
3
|
-
// @ts-ignore - Optional peer dependency
|
|
4
|
-
import { useNavigation } from '@react-navigation/native';
|
|
5
|
-
import { useLocalization } from '../storage/LocalizationStore';
|
|
6
|
-
import { getLanguageByCode, getDefaultLanguage } from '../config/languages';
|
|
7
|
-
const languageSwitcherConfig = {
|
|
8
|
-
defaultIconSize: 20,
|
|
9
|
-
defaultNavigationScreen: 'LanguageSelection',
|
|
10
|
-
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
11
|
-
};
|
|
12
|
-
export const LanguageSwitcher = ({ showName = false, showFlag = true, color, navigationScreen = languageSwitcherConfig.defaultNavigationScreen, style, textStyle, }) => {
|
|
13
|
-
const navigation = useNavigation();
|
|
14
|
-
const { currentLanguage } = useLocalization();
|
|
15
|
-
const currentLang = getLanguageByCode(currentLanguage) || getDefaultLanguage();
|
|
16
|
-
const navigateToLanguageSelection = () => {
|
|
17
|
-
if (navigation && navigationScreen) {
|
|
18
|
-
navigation.navigate(navigationScreen);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const iconColor = color || '#000000';
|
|
22
|
-
return (<TouchableOpacity style={[styles.container, style]} onPress={navigateToLanguageSelection} activeOpacity={0.7} hitSlop={languageSwitcherConfig.hitSlop}>
|
|
23
|
-
{showFlag && (<Text style={[styles.flag, textStyle]}>{currentLang.flag}</Text>)}
|
|
24
|
-
{showName && (<Text style={[styles.languageName, { color: iconColor }, textStyle]}>
|
|
25
|
-
{currentLang.nativeName}
|
|
26
|
-
</Text>)}
|
|
27
|
-
{!showName && !showFlag && (<Text style={[styles.icon, { color: iconColor }]}>🌐</Text>)}
|
|
28
|
-
</TouchableOpacity>);
|
|
29
|
-
};
|
|
30
|
-
const styles = StyleSheet.create({
|
|
31
|
-
container: {
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
alignItems: 'center',
|
|
34
|
-
gap: 8,
|
|
35
|
-
paddingHorizontal: 4,
|
|
36
|
-
},
|
|
37
|
-
flag: {
|
|
38
|
-
fontSize: 20,
|
|
39
|
-
},
|
|
40
|
-
languageName: {
|
|
41
|
-
fontSize: 14,
|
|
42
|
-
fontWeight: '600',
|
|
43
|
-
},
|
|
44
|
-
icon: {
|
|
45
|
-
fontSize: 20,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
export default LanguageSwitcher;
|
|
49
|
-
//# sourceMappingURL=LanguageSwitcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.js","sourceRoot":"","sources":["../../../src/infrastructure/components/LanguageSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAQ,UAAU,EAAE,MAAM,cAAc,CAAC;AACxE,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAY5E,MAAM,sBAAsB,GAAG;IAC7B,eAAe,EAAE,EAAE;IACnB,uBAAuB,EAAE,mBAAmB;IAC5C,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,IAAI,EACf,KAAK,EACL,gBAAgB,GAAG,sBAAsB,CAAC,uBAAuB,EACjE,KAAK,EACL,SAAS,GACV,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,iBAAiB,CAAC,eAAe,CAAC,IAAI,kBAAkB,EAAE,CAA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;QACpB,GAAG,EAAE,CAAC;QACN,iBAAiB,EAAE,CAAC;KACrB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;KACb;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LocalizationProvider Component
|
|
3
|
-
* Initializes localization system on mount
|
|
4
|
-
*/
|
|
5
|
-
import React, { ReactNode } from 'react';
|
|
6
|
-
interface LocalizationProviderProps {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare const LocalizationProvider: React.FC<LocalizationProviderProps>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=LocalizationProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationProvider.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/components/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpD,UAAU,yBAAyB;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAQpE,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LocalizationProvider Component
|
|
3
|
-
* Initializes localization system on mount
|
|
4
|
-
*/
|
|
5
|
-
import React, { useEffect } from 'react';
|
|
6
|
-
import { useLocalizationStore } from '../storage/LocalizationStore';
|
|
7
|
-
export const LocalizationProvider = ({ children }) => {
|
|
8
|
-
const initialize = useLocalizationStore((state) => state.initialize);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
initialize();
|
|
11
|
-
}, [initialize]);
|
|
12
|
-
return <>{children}</>;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=LocalizationProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/components/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAMpE,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,MAAM,UAAU,GAAG,oBAAoB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAErE,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,EAAE,CAAC;IACf,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Language } from '../../domain/repositories/ILocalizationRepository';
|
|
2
|
-
export declare const useLanguageNavigation: (navigationScreen: string) => {
|
|
3
|
-
currentLang: Language;
|
|
4
|
-
navigateToLanguageSelection: () => void;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=useLanguageNavigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLanguageNavigation.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/components/useLanguageNavigation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAE7E,eAAO,MAAM,qBAAqB,GAAI,kBAAkB,MAAM;;;CAY7D,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-ignore - Optional peer dependency
|
|
2
|
-
import { useNavigation } from '@react-navigation/native';
|
|
3
|
-
import { useLocalization } from '../storage/LocalizationStore';
|
|
4
|
-
import { getLanguageByCode, getDefaultLanguage } from '../config/languages';
|
|
5
|
-
export const useLanguageNavigation = (navigationScreen) => {
|
|
6
|
-
const navigation = useNavigation();
|
|
7
|
-
const { currentLanguage } = useLocalization();
|
|
8
|
-
const currentLang = getLanguageByCode(currentLanguage) || getDefaultLanguage();
|
|
9
|
-
const navigateToLanguageSelection = () => {
|
|
10
|
-
if (navigation && navigationScreen) {
|
|
11
|
-
navigation.navigate(navigationScreen);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
return { currentLang, navigateToLanguageSelection };
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=useLanguageNavigation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLanguageNavigation.js","sourceRoot":"","sources":["../../../src/infrastructure/components/useLanguageNavigation.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,gBAAwB,EAAE,EAAE;IAChE,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,iBAAiB,CAAC,eAAe,CAAC,IAAI,kBAAkB,EAAE,CAAC;IAE/E,MAAM,2BAA2B,GAAG,GAAG,EAAE;QACvC,IAAI,UAAU,IAAI,gBAAgB,EAAE,CAAC;YACnC,UAAU,CAAC,QAAQ,CAAC,gBAAyB,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;AACtD,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* i18next Configuration
|
|
3
|
-
* Nested translation structure - common translations spread, domain translations nested
|
|
4
|
-
*
|
|
5
|
-
* AUTOMATIC LANGUAGE LOADING:
|
|
6
|
-
* - Uses require.context to auto-discover all language directories
|
|
7
|
-
* - No manual imports needed - all languages loaded automatically
|
|
8
|
-
* - Project translations merged with package defaults
|
|
9
|
-
*/
|
|
10
|
-
import i18n from 'i18next';
|
|
11
|
-
export default i18n;
|
|
12
|
-
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAgR3B,eAAe,IAAI,CAAC"}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* i18next Configuration
|
|
3
|
-
* Nested translation structure - common translations spread, domain translations nested
|
|
4
|
-
*
|
|
5
|
-
* AUTOMATIC LANGUAGE LOADING:
|
|
6
|
-
* - Uses require.context to auto-discover all language directories
|
|
7
|
-
* - No manual imports needed - all languages loaded automatically
|
|
8
|
-
* - Project translations merged with package defaults
|
|
9
|
-
*/
|
|
10
|
-
import i18n from 'i18next';
|
|
11
|
-
import { initReactI18next } from 'react-i18next';
|
|
12
|
-
import { DEFAULT_LANGUAGE } from './languages';
|
|
13
|
-
/**
|
|
14
|
-
* AUTOMATIC LANGUAGE LOADING
|
|
15
|
-
*
|
|
16
|
-
* Uses Metro bundler's require.context to automatically discover and load
|
|
17
|
-
* all language directories. No manual imports needed!
|
|
18
|
-
*
|
|
19
|
-
* Structure:
|
|
20
|
-
* locales/
|
|
21
|
-
* ar-SA/index.ts
|
|
22
|
-
* bg-BG/index.ts
|
|
23
|
-
* en-US/index.ts
|
|
24
|
-
* ... (all languages auto-discovered)
|
|
25
|
-
*/
|
|
26
|
-
// Auto-load all package locale directories using require.context
|
|
27
|
-
// This automatically discovers all language folders (ar-SA, bg-BG, en-US, etc.)
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
29
|
-
const packageLocalesContext = require.context('../locales', true, /\/index\.ts$/);
|
|
30
|
-
/**
|
|
31
|
-
* Load all package translations automatically
|
|
32
|
-
* Extracts language code from path (e.g., './ar-SA/index.ts' -> 'ar-SA')
|
|
33
|
-
*/
|
|
34
|
-
const loadPackageTranslations = () => {
|
|
35
|
-
const packageTranslations = {};
|
|
36
|
-
packageLocalesContext.keys().forEach((key) => {
|
|
37
|
-
// Extract language code from path: './ar-SA/index.ts' -> 'ar-SA'
|
|
38
|
-
const match = key.match(/\.\/([^/]+)\/index\.ts$/);
|
|
39
|
-
if (match) {
|
|
40
|
-
const languageCode = match[1];
|
|
41
|
-
try {
|
|
42
|
-
const translations = packageLocalesContext(key);
|
|
43
|
-
packageTranslations[languageCode] = translations.default || translations;
|
|
44
|
-
/* eslint-disable-next-line no-console */
|
|
45
|
-
if (__DEV__)
|
|
46
|
-
console.log(`[i18n] ✅ Loaded package translations: ${languageCode}`);
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
/* eslint-disable-next-line no-console */
|
|
50
|
-
if (__DEV__)
|
|
51
|
-
console.warn(`[i18n] ⚠️ Failed to load package translations for ${languageCode}:`, error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return packageTranslations;
|
|
56
|
-
};
|
|
57
|
-
const packageTranslations = loadPackageTranslations();
|
|
58
|
-
/**
|
|
59
|
-
* Try to load project-specific translations
|
|
60
|
-
* Metro bundler will resolve these at build time if they exist
|
|
61
|
-
* If they don't exist, the require will fail gracefully
|
|
62
|
-
*/
|
|
63
|
-
let projectTranslations = {};
|
|
64
|
-
// Try to load project translations from common paths
|
|
65
|
-
// Metro bundler will include these if they exist at build time
|
|
66
|
-
try {
|
|
67
|
-
// Try DDD structure path with require.context for automatic discovery
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
69
|
-
const projectLocalesContext = require.context('../../../../../../src/domains/localization/infrastructure/locales', true, /\/index\.ts$/);
|
|
70
|
-
projectLocalesContext.keys().forEach((key) => {
|
|
71
|
-
const match = key.match(/\.\/([^/]+)\/index\.ts$/);
|
|
72
|
-
if (match) {
|
|
73
|
-
const languageCode = match[1];
|
|
74
|
-
try {
|
|
75
|
-
const translations = projectLocalesContext(key);
|
|
76
|
-
if (!projectTranslations[languageCode]) {
|
|
77
|
-
projectTranslations[languageCode] = {};
|
|
78
|
-
}
|
|
79
|
-
projectTranslations[languageCode] = translations.default || translations;
|
|
80
|
-
/* eslint-disable-next-line no-console */
|
|
81
|
-
if (__DEV__)
|
|
82
|
-
console.log(`[i18n] ✅ Loaded project translations: ${languageCode}`);
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
/* eslint-disable-next-line no-console */
|
|
86
|
-
if (__DEV__)
|
|
87
|
-
console.warn(`[i18n] ⚠️ Failed to load project translations for ${languageCode}:`, error);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
/* eslint-disable-next-line no-console */
|
|
92
|
-
if (__DEV__)
|
|
93
|
-
console.log('[i18n] ✅ Loaded project translations from DDD structure');
|
|
94
|
-
}
|
|
95
|
-
catch (e1) {
|
|
96
|
-
try {
|
|
97
|
-
// Try alternative DDD structure path
|
|
98
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
99
|
-
const projectLocalesContext = require.context('../../../../../../domains/localization/infrastructure/locales', true, /\/index\.ts$/);
|
|
100
|
-
projectLocalesContext.keys().forEach((key) => {
|
|
101
|
-
const match = key.match(/\.\/([^/]+)\/index\.ts$/);
|
|
102
|
-
if (match) {
|
|
103
|
-
const languageCode = match[1];
|
|
104
|
-
try {
|
|
105
|
-
const translations = projectLocalesContext(key);
|
|
106
|
-
if (!projectTranslations[languageCode]) {
|
|
107
|
-
projectTranslations[languageCode] = {};
|
|
108
|
-
}
|
|
109
|
-
projectTranslations[languageCode] = translations.default || translations;
|
|
110
|
-
}
|
|
111
|
-
catch (error) {
|
|
112
|
-
// Ignore individual language errors
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
/* eslint-disable-next-line no-console */
|
|
117
|
-
if (__DEV__)
|
|
118
|
-
console.log('[i18n] ✅ Loaded project translations from alternative DDD structure');
|
|
119
|
-
}
|
|
120
|
-
catch (e2) {
|
|
121
|
-
try {
|
|
122
|
-
// Try simple structure path
|
|
123
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
124
|
-
const projectLocalesContext = require.context('../../../../../../src/locales', true, /\/index\.ts$/);
|
|
125
|
-
projectLocalesContext.keys().forEach((key) => {
|
|
126
|
-
const match = key.match(/\.\/([^/]+)\/index\.ts$/);
|
|
127
|
-
if (match) {
|
|
128
|
-
const languageCode = match[1];
|
|
129
|
-
try {
|
|
130
|
-
const translations = projectLocalesContext(key);
|
|
131
|
-
if (!projectTranslations[languageCode]) {
|
|
132
|
-
projectTranslations[languageCode] = {};
|
|
133
|
-
}
|
|
134
|
-
projectTranslations[languageCode] = translations.default || translations;
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
// Ignore individual language errors
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
/* eslint-disable-next-line no-console */
|
|
142
|
-
if (__DEV__)
|
|
143
|
-
console.log('[i18n] ✅ Loaded project translations from simple structure');
|
|
144
|
-
}
|
|
145
|
-
catch (e3) {
|
|
146
|
-
// No project translations found - this is OK, use package defaults only
|
|
147
|
-
/* eslint-disable-next-line no-console */
|
|
148
|
-
if (__DEV__)
|
|
149
|
-
console.log('[i18n] ℹ️ No project-specific translations found, using package defaults only');
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Translation Resources
|
|
155
|
-
* Merge package defaults with project-specific translations
|
|
156
|
-
* Project translations override package defaults (deep merge)
|
|
157
|
-
*/
|
|
158
|
-
const mergeTranslations = (packageTranslations, projectTranslations) => {
|
|
159
|
-
if (!projectTranslations || Object.keys(projectTranslations).length === 0) {
|
|
160
|
-
return packageTranslations;
|
|
161
|
-
}
|
|
162
|
-
// Deep merge: project translations override package defaults
|
|
163
|
-
const merged = { ...packageTranslations };
|
|
164
|
-
for (const key in projectTranslations) {
|
|
165
|
-
if (projectTranslations.hasOwnProperty(key)) {
|
|
166
|
-
if (typeof projectTranslations[key] === 'object' &&
|
|
167
|
-
projectTranslations[key] !== null &&
|
|
168
|
-
!Array.isArray(projectTranslations[key]) &&
|
|
169
|
-
typeof packageTranslations[key] === 'object' &&
|
|
170
|
-
packageTranslations[key] !== null &&
|
|
171
|
-
!Array.isArray(packageTranslations[key])) {
|
|
172
|
-
// Deep merge nested objects
|
|
173
|
-
merged[key] = mergeTranslations(packageTranslations[key], projectTranslations[key]);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
// Override with project translation
|
|
177
|
-
merged[key] = projectTranslations[key];
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return merged;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Build resources object for all languages
|
|
185
|
-
* Automatically includes all package languages + project languages
|
|
186
|
-
*/
|
|
187
|
-
const buildResources = () => {
|
|
188
|
-
const resources = {};
|
|
189
|
-
// Get all unique language codes from both package and project translations
|
|
190
|
-
const allLanguageCodes = new Set([
|
|
191
|
-
...Object.keys(packageTranslations),
|
|
192
|
-
...Object.keys(projectTranslations),
|
|
193
|
-
]);
|
|
194
|
-
// Build resources for each language
|
|
195
|
-
allLanguageCodes.forEach((languageCode) => {
|
|
196
|
-
const packageTranslation = packageTranslations[languageCode] || {};
|
|
197
|
-
const projectTranslation = projectTranslations[languageCode] || {};
|
|
198
|
-
resources[languageCode] = {
|
|
199
|
-
translation: mergeTranslations(packageTranslation, projectTranslation),
|
|
200
|
-
};
|
|
201
|
-
});
|
|
202
|
-
/* eslint-disable-next-line no-console */
|
|
203
|
-
if (__DEV__)
|
|
204
|
-
console.log(`[i18n] 📦 Loaded ${Object.keys(resources).length} languages:`, Object.keys(resources).join(', '));
|
|
205
|
-
return resources;
|
|
206
|
-
};
|
|
207
|
-
const resources = buildResources();
|
|
208
|
-
/**
|
|
209
|
-
* Initialize i18next
|
|
210
|
-
* Deferred initialization to avoid React Native renderer conflicts
|
|
211
|
-
*/
|
|
212
|
-
let isInitialized = false;
|
|
213
|
-
const initializeI18n = () => {
|
|
214
|
-
if (isInitialized)
|
|
215
|
-
return;
|
|
216
|
-
try {
|
|
217
|
-
/* eslint-disable-next-line no-console */
|
|
218
|
-
if (__DEV__)
|
|
219
|
-
console.log('[i18n] Initializing i18next...');
|
|
220
|
-
// Check if initReactI18next is available
|
|
221
|
-
if (!initReactI18next) {
|
|
222
|
-
throw new Error('initReactI18next is undefined');
|
|
223
|
-
}
|
|
224
|
-
/* eslint-disable-next-line no-console */
|
|
225
|
-
if (__DEV__)
|
|
226
|
-
console.log('[i18n] initReactI18next found, initializing...');
|
|
227
|
-
i18n.use(initReactI18next).init({
|
|
228
|
-
resources,
|
|
229
|
-
lng: DEFAULT_LANGUAGE,
|
|
230
|
-
fallbackLng: DEFAULT_LANGUAGE,
|
|
231
|
-
interpolation: {
|
|
232
|
-
escapeValue: false, // React already escapes values
|
|
233
|
-
},
|
|
234
|
-
react: {
|
|
235
|
-
useSuspense: false, // Disable suspense for React Native
|
|
236
|
-
},
|
|
237
|
-
compatibilityJSON: 'v3', // Use v3 format for React Native (no Intl.PluralRules support)
|
|
238
|
-
pluralSeparator: '_', // Use underscore separator for plural keys
|
|
239
|
-
keySeparator: '.', // Use dot separator for nested keys
|
|
240
|
-
});
|
|
241
|
-
isInitialized = true;
|
|
242
|
-
/* eslint-disable-next-line no-console */
|
|
243
|
-
if (__DEV__)
|
|
244
|
-
console.log('[i18n] i18next initialized successfully');
|
|
245
|
-
}
|
|
246
|
-
catch (error) {
|
|
247
|
-
/* eslint-disable-next-line no-console */
|
|
248
|
-
if (__DEV__)
|
|
249
|
-
console.error('[i18n] Initialization error:', error);
|
|
250
|
-
// Don't throw - allow app to continue without i18n
|
|
251
|
-
/* eslint-disable-next-line no-console */
|
|
252
|
-
if (__DEV__)
|
|
253
|
-
console.warn('[i18n] Continuing without i18n initialization');
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
// Defer initialization until React is ready
|
|
257
|
-
// React Native doesn't have window, so we check for global
|
|
258
|
-
if (typeof global !== 'undefined') {
|
|
259
|
-
// Use setTimeout to defer initialization
|
|
260
|
-
setTimeout(() => {
|
|
261
|
-
initializeI18n();
|
|
262
|
-
}, 0);
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
// Fallback: initialize immediately
|
|
266
|
-
initializeI18n();
|
|
267
|
-
}
|
|
268
|
-
export default i18n;
|
|
269
|
-
//# sourceMappingURL=i18n.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../src/infrastructure/config/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAuB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpE;;;;;;;;;;;;GAYG;AAEH,iEAAiE;AACjE,gFAAgF;AAChF,iEAAiE;AACjE,MAAM,qBAAqB,GAAI,OAAe,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE3F;;;GAGG;AACH,MAAM,uBAAuB,GAAG,GAAwB,EAAE;IACxD,MAAM,mBAAmB,GAAwB,EAAE,CAAC;IAEpD,qBAAq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*
|
|
5
|
-
* SINGLE SOURCE OF TRUTH: Imports from constants/languages.ts
|
|
6
|
-
* - All language definitions come from one central location
|
|
7
|
-
* - Ensures consistency across app.json, i18n config, and UI
|
|
8
|
-
* - Automatic synchronization between all language configurations
|
|
9
|
-
*
|
|
10
|
-
* DEVICE LOCALE DETECTION:
|
|
11
|
-
* - First launch: Automatically detects device locale
|
|
12
|
-
* - Fallback: English (en-US) if device locale not supported
|
|
13
|
-
* - User choice: Persists after manual language selection
|
|
14
|
-
*/
|
|
15
|
-
import { Language } from '../../domain/repositories/ILocalizationRepository';
|
|
16
|
-
export declare const SUPPORTED_LANGUAGES: Language[];
|
|
17
|
-
export declare const LANGUAGES: Language[];
|
|
18
|
-
export declare const DEFAULT_LANGUAGE = "en-US";
|
|
19
|
-
export declare const getLanguageByCode: (code: string) => Language | undefined;
|
|
20
|
-
export declare const isLanguageSupported: (code: string) => boolean;
|
|
21
|
-
export declare const getDefaultLanguage: () => Language;
|
|
22
|
-
/**
|
|
23
|
-
* Get device locale and map it to supported language
|
|
24
|
-
* Called ONLY on first launch (when no saved language preference exists)
|
|
25
|
-
*
|
|
26
|
-
* @returns Supported language code or DEFAULT_LANGUAGE
|
|
27
|
-
*
|
|
28
|
-
* Examples:
|
|
29
|
-
* - Device: "en" → Returns: "en-US"
|
|
30
|
-
* - Device: "en-GB" → Returns: "en-US"
|
|
31
|
-
* - Device: "tr" → Returns: "tr-TR" (if supported)
|
|
32
|
-
* - Device: "de" → Returns: "en-US" (not supported, fallback)
|
|
33
|
-
*/
|
|
34
|
-
export declare const getDeviceLocale: () => string;
|
|
35
|
-
/**
|
|
36
|
-
* Search languages by name or native name
|
|
37
|
-
*/
|
|
38
|
-
export declare const searchLanguages: (query: string) => Language[];
|
|
39
|
-
//# sourceMappingURL=languages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/languages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAG7E,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EAAmB,CAAC;AAG9D,eAAO,MAAM,SAAS,YAAsB,CAAC;AAE7C,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAoKxC,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,QAAQ,GAAG,SAE3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,OAElD,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAO,QAErC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,QAAO,MAkClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,QAAQ,EAOvD,CAAC"}
|