@umituz/react-native-localization 1.5.0 → 1.5.2

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.
Files changed (49) hide show
  1. package/package.json +1 -6
  2. package/src/infrastructure/config/i18n.ts +2 -34
  3. package/src/infrastructure/config/languages.ts +0 -1
  4. package/src/infrastructure/storage/AsyncStorageWrapper.ts +1 -2
  5. package/src/infrastructure/storage/LocalizationStore.ts +0 -62
  6. package/lib/domain/repositories/ILocalizationRepository.d.ts +0 -17
  7. package/lib/domain/repositories/ILocalizationRepository.d.ts.map +0 -1
  8. package/lib/domain/repositories/ILocalizationRepository.js +0 -6
  9. package/lib/domain/repositories/ILocalizationRepository.js.map +0 -1
  10. package/lib/index.d.ts +0 -13
  11. package/lib/index.d.ts.map +0 -1
  12. package/lib/index.js +0 -15
  13. package/lib/index.js.map +0 -1
  14. package/lib/infrastructure/components/LanguageSwitcher.d.ts +0 -12
  15. package/lib/infrastructure/components/LanguageSwitcher.d.ts.map +0 -1
  16. package/lib/infrastructure/components/LanguageSwitcher.js +0 -49
  17. package/lib/infrastructure/components/LanguageSwitcher.js.map +0 -1
  18. package/lib/infrastructure/components/LocalizationProvider.d.ts +0 -11
  19. package/lib/infrastructure/components/LocalizationProvider.d.ts.map +0 -1
  20. package/lib/infrastructure/components/LocalizationProvider.js +0 -14
  21. package/lib/infrastructure/components/LocalizationProvider.js.map +0 -1
  22. package/lib/infrastructure/components/useLanguageNavigation.d.ts +0 -6
  23. package/lib/infrastructure/components/useLanguageNavigation.d.ts.map +0 -1
  24. package/lib/infrastructure/components/useLanguageNavigation.js +0 -16
  25. package/lib/infrastructure/components/useLanguageNavigation.js.map +0 -1
  26. package/lib/infrastructure/config/i18n.d.ts +0 -12
  27. package/lib/infrastructure/config/i18n.d.ts.map +0 -1
  28. package/lib/infrastructure/config/i18n.js +0 -269
  29. package/lib/infrastructure/config/i18n.js.map +0 -1
  30. package/lib/infrastructure/config/languages.d.ts +0 -39
  31. package/lib/infrastructure/config/languages.d.ts.map +0 -1
  32. package/lib/infrastructure/config/languages.js +0 -210
  33. package/lib/infrastructure/config/languages.js.map +0 -1
  34. package/lib/infrastructure/config/languagesData.d.ts +0 -26
  35. package/lib/infrastructure/config/languagesData.d.ts.map +0 -1
  36. package/lib/infrastructure/config/languagesData.js +0 -58
  37. package/lib/infrastructure/config/languagesData.js.map +0 -1
  38. package/lib/infrastructure/locales/en-US/index.d.ts +0 -29
  39. package/lib/infrastructure/locales/en-US/index.d.ts.map +0 -1
  40. package/lib/infrastructure/locales/en-US/index.js +0 -40
  41. package/lib/infrastructure/locales/en-US/index.js.map +0 -1
  42. package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts +0 -12
  43. package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts.map +0 -1
  44. package/lib/infrastructure/storage/AsyncStorageWrapper.js +0 -29
  45. package/lib/infrastructure/storage/AsyncStorageWrapper.js.map +0 -1
  46. package/lib/infrastructure/storage/LocalizationStore.d.ts +0 -31
  47. package/lib/infrastructure/storage/LocalizationStore.d.ts.map +0 -1
  48. package/lib/infrastructure/storage/LocalizationStore.js +0 -192
  49. package/lib/infrastructure/storage/LocalizationStore.js.map +0 -1
@@ -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,eAA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AW,EAAE,CAAC;IAClC,yCAAyC;IACzC,UAAU,CAAC,GAAG,EAAE;QACd,cAAc,EAAE,CAAC;IACnB,CAAC,EAAE,CAAC,CAAC,CAAC;AACR,CAAC;KAAM,CAAC;IACN,mCAAmC;IACnC,cAAc,EAAE,CAAC;AACnB,CAAC;AAED,eAAe,IAAI,CAAC"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Supported Languages Configuration
3
- * Complete list of 29 languages supported by the app
4
- *
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"}
@@ -1,210 +0,0 @@
1
- /**
2
- * Supported Languages Configuration
3
- * Complete list of 29 languages supported by the app
4
- *
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 * as Localization from 'expo-localization';
16
- import { LANGUAGES as LANGUAGES_DATA } from './languagesData';
17
- // Single source of truth for supported languages
18
- export const SUPPORTED_LANGUAGES = LANGUAGES_DATA;
19
- // Export LANGUAGES as alias for SUPPORTED_LANGUAGES for backward compatibility
20
- export const LANGUAGES = SUPPORTED_LANGUAGES;
21
- export const DEFAULT_LANGUAGE = 'en-US';
22
- /**
23
- * Locale mapping for device locales to supported app locales
24
- * Maps short codes (e.g., "en") and iOS variants (e.g., "en-GB", "zh-Hans") to our supported locales
25
- *
26
- * COMPREHENSIVE MAPPING:
27
- * - Short codes (ar, bg, cs, da, de, etc.) → Full locale codes (ar-SA, bg-BG, etc.)
28
- * - iOS regional variants → Our standard locales
29
- * - All 29 supported languages included
30
- */
31
- const LOCALE_MAPPING = {
32
- // Arabic
33
- 'ar': 'ar-SA',
34
- 'ar-SA': 'ar-SA',
35
- 'ar-AE': 'ar-SA',
36
- 'ar-EG': 'ar-SA',
37
- // Bulgarian
38
- 'bg': 'bg-BG',
39
- 'bg-BG': 'bg-BG',
40
- // Czech
41
- 'cs': 'cs-CZ',
42
- 'cs-CZ': 'cs-CZ',
43
- // Danish
44
- 'da': 'da-DK',
45
- 'da-DK': 'da-DK',
46
- // German
47
- 'de': 'de-DE',
48
- 'de-DE': 'de-DE',
49
- 'de-AT': 'de-DE',
50
- 'de-CH': 'de-DE',
51
- // Greek (iOS has el, we map to en-US fallback since we don't support Greek)
52
- 'el': 'en-US',
53
- // English variants
54
- 'en': 'en-US',
55
- 'en-US': 'en-US',
56
- 'en-GB': 'en-US',
57
- 'en-AU': 'en-US',
58
- 'en-CA': 'en-US',
59
- 'en-NZ': 'en-US',
60
- 'en-IE': 'en-US',
61
- 'en-ZA': 'en-US',
62
- // Spanish
63
- 'es': 'es-ES',
64
- 'es-ES': 'es-ES',
65
- 'es-MX': 'es-ES',
66
- 'es-AR': 'es-ES',
67
- // Finnish
68
- 'fi': 'fi-FI',
69
- 'fi-FI': 'fi-FI',
70
- // French
71
- 'fr': 'fr-FR',
72
- 'fr-FR': 'fr-FR',
73
- 'fr-CA': 'fr-FR',
74
- 'fr-BE': 'fr-FR',
75
- 'fr-CH': 'fr-FR',
76
- // Hindi
77
- 'hi': 'hi-IN',
78
- 'hi-IN': 'hi-IN',
79
- // Croatian (iOS has hr, we map to en-US fallback since we don't support Croatian)
80
- 'hr': 'en-US',
81
- // Hungarian
82
- 'hu': 'hu-HU',
83
- 'hu-HU': 'hu-HU',
84
- // Indonesian
85
- 'id': 'id-ID',
86
- 'id-ID': 'id-ID',
87
- // Italian
88
- 'it': 'it-IT',
89
- 'it-IT': 'it-IT',
90
- // Japanese
91
- 'ja': 'ja-JP',
92
- 'ja-JP': 'ja-JP',
93
- // Korean
94
- 'ko': 'ko-KR',
95
- 'ko-KR': 'ko-KR',
96
- // Malay
97
- 'ms': 'ms-MY',
98
- 'ms-MY': 'ms-MY',
99
- // Norwegian (iOS uses nb for Norwegian Bokmål)
100
- 'nb': 'no-NO',
101
- 'no': 'no-NO',
102
- 'no-NO': 'no-NO',
103
- // Dutch
104
- 'nl': 'nl-NL',
105
- 'nl-NL': 'nl-NL',
106
- 'nl-BE': 'nl-NL',
107
- // Polish
108
- 'pl': 'pl-PL',
109
- 'pl-PL': 'pl-PL',
110
- // Portuguese
111
- 'pt': 'pt-PT',
112
- 'pt-PT': 'pt-PT',
113
- 'pt-BR': 'pt-PT',
114
- // Romanian
115
- 'ro': 'ro-RO',
116
- 'ro-RO': 'ro-RO',
117
- // Russian
118
- 'ru': 'ru-RU',
119
- 'ru-RU': 'ru-RU',
120
- // Slovak (iOS has sk, we map to en-US fallback since we don't support Slovak)
121
- 'sk': 'en-US',
122
- // Swedish
123
- 'sv': 'sv-SE',
124
- 'sv-SE': 'sv-SE',
125
- // Thai
126
- 'th': 'th-TH',
127
- 'th-TH': 'th-TH',
128
- // Filipino/Tagalog
129
- 'tl': 'tl-PH',
130
- 'tl-PH': 'tl-PH',
131
- 'fil': 'tl-PH',
132
- // Turkish
133
- 'tr': 'tr-TR',
134
- 'tr-TR': 'tr-TR',
135
- // Ukrainian
136
- 'uk': 'uk-UA',
137
- 'uk-UA': 'uk-UA',
138
- // Vietnamese
139
- 'vi': 'vi-VN',
140
- 'vi-VN': 'vi-VN',
141
- // Chinese Simplified (iOS uses zh-Hans)
142
- 'zh': 'zh-CN',
143
- 'zh-CN': 'zh-CN',
144
- 'zh-Hans': 'zh-CN',
145
- 'zh-Hans-CN': 'zh-CN',
146
- // Chinese Traditional (iOS uses zh-Hant, we map to zh-CN since we only support Simplified)
147
- 'zh-Hant': 'zh-CN',
148
- 'zh-TW': 'zh-CN',
149
- 'zh-HK': 'zh-CN',
150
- };
151
- export const getLanguageByCode = (code) => {
152
- return SUPPORTED_LANGUAGES.find((lang) => lang.code === code);
153
- };
154
- export const isLanguageSupported = (code) => {
155
- return SUPPORTED_LANGUAGES.some((lang) => lang.code === code);
156
- };
157
- export const getDefaultLanguage = () => {
158
- return SUPPORTED_LANGUAGES[0]; // en-US
159
- };
160
- /**
161
- * Get device locale and map it to supported language
162
- * Called ONLY on first launch (when no saved language preference exists)
163
- *
164
- * @returns Supported language code or DEFAULT_LANGUAGE
165
- *
166
- * Examples:
167
- * - Device: "en" → Returns: "en-US"
168
- * - Device: "en-GB" → Returns: "en-US"
169
- * - Device: "tr" → Returns: "tr-TR" (if supported)
170
- * - Device: "de" → Returns: "en-US" (not supported, fallback)
171
- */
172
- export const getDeviceLocale = () => {
173
- try {
174
- // Get device locale (e.g., "en-US", "tr-TR", or just "en")
175
- const deviceLocale = Localization.locale;
176
- if (!deviceLocale) {
177
- return DEFAULT_LANGUAGE;
178
- }
179
- // Check if exact match exists in LOCALE_MAPPING
180
- if (LOCALE_MAPPING[deviceLocale]) {
181
- return LOCALE_MAPPING[deviceLocale];
182
- }
183
- // Extract language code (e.g., "en" from "en-US")
184
- const languageCode = deviceLocale.split('-')[0];
185
- // Check if language code exists in LOCALE_MAPPING
186
- if (LOCALE_MAPPING[languageCode]) {
187
- return LOCALE_MAPPING[languageCode];
188
- }
189
- // Check if device locale is directly supported
190
- if (isLanguageSupported(deviceLocale)) {
191
- return deviceLocale;
192
- }
193
- // Fallback to default language
194
- return DEFAULT_LANGUAGE;
195
- }
196
- catch (error) {
197
- // If any error occurs, fallback to default
198
- console.warn('[Localization] Failed to detect device locale:', error);
199
- return DEFAULT_LANGUAGE;
200
- }
201
- };
202
- /**
203
- * Search languages by name or native name
204
- */
205
- export const searchLanguages = (query) => {
206
- const lowerQuery = query.toLowerCase();
207
- return SUPPORTED_LANGUAGES.filter((lang) => lang.name.toLowerCase().includes(lowerQuery) ||
208
- lang.nativeName.toLowerCase().includes(lowerQuery));
209
- };
210
- //# sourceMappingURL=languages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/infrastructure/config/languages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG9D,iDAAiD;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAe,cAAc,CAAC;AAE9D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,cAAc,GAA2B;IAC7C,SAAS;IACT,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAEhB,YAAY;IACZ,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAEhB,QAAQ;IACR,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAEhB,SAAS;IACT,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAEhB,SAAS;IACT,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAEhB,4EAA4E;IAC5E,IAAI,EAAE,OAAO;IAEb,mBAAmB;IACnB,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAEhB,UAAU;IACV,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;IAChB,O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C;QAED,gDAAgD;QAChD,IAAI,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC;YACjC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;QAED,kDAAkD;QAClD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEhD,kDAAkD;QAClD,IAAI,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC;YACjC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;QAED,+CAA+C;QAC/C,IAAI,mBAAmB,CAAC,YAAY,CAAC,EAAE,CAAC;YACtC,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,+BAA+B;QAC/B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,2CAA2C;QAC3C,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAC;QACtE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAc,EAAE;IAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,OAAO,mBAAmB,CAAC,MAAM,CAC/B,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC5C,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CACrD,CAAC;AACJ,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Language Configuration
3
- * Strategic language support with 29 languages (top revenue markets only)
4
- * Optimized for maximum monetization with minimal maintenance cost
5
- * Generated from App Factory language_config.yaml
6
- */
7
- export interface Language {
8
- code: string;
9
- name: string;
10
- nativeName: string;
11
- flag: string;
12
- }
13
- export declare const LANGUAGES: Language[];
14
- /**
15
- * Get language by code
16
- */
17
- export declare const getLanguageByCode: (code: string) => Language | undefined;
18
- /**
19
- * Get default language (en-US)
20
- */
21
- export declare const getDefaultLanguage: () => Language;
22
- /**
23
- * Search languages by name or native name
24
- */
25
- export declare const searchLanguages: (query: string) => Language[];
26
- //# sourceMappingURL=languagesData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"languagesData.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/languagesData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EA8B/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,QAAQ,GAAG,SAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAO,QAErC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,QAAQ,EAOvD,CAAC"}
@@ -1,58 +0,0 @@
1
- /**
2
- * Language Configuration
3
- * Strategic language support with 29 languages (top revenue markets only)
4
- * Optimized for maximum monetization with minimal maintenance cost
5
- * Generated from App Factory language_config.yaml
6
- */
7
- export const LANGUAGES = [
8
- { code: 'ar-SA', name: 'Arabic', nativeName: 'العربية', flag: '🇸🇦' },
9
- { code: 'bg-BG', name: 'Bulgarian', nativeName: 'Български', flag: '🇧🇬' },
10
- { code: 'cs-CZ', name: 'Czech', nativeName: 'Čeština', flag: '🇨🇿' },
11
- { code: 'da-DK', name: 'Danish', nativeName: 'Dansk', flag: '🇩🇰' },
12
- { code: 'de-DE', name: 'German', nativeName: 'Deutsch', flag: '🇩🇪' },
13
- { code: 'en-US', name: 'English', nativeName: 'English', flag: '🇺🇸' },
14
- { code: 'es-ES', name: 'Spanish', nativeName: 'Español', flag: '🇪🇸' },
15
- { code: 'fi-FI', name: 'Finnish', nativeName: 'Suomi', flag: '🇫🇮' },
16
- { code: 'fr-FR', name: 'French', nativeName: 'Français', flag: '🇫🇷' },
17
- { code: 'hi-IN', name: 'Hindi', nativeName: 'हिन्दी', flag: '🇮🇳' },
18
- { code: 'hu-HU', name: 'Hungarian', nativeName: 'Magyar', flag: '🇭🇺' },
19
- { code: 'id-ID', name: 'Indonesian', nativeName: 'Bahasa Indonesia', flag: '🇮🇩' },
20
- { code: 'it-IT', name: 'Italian', nativeName: 'Italiano', flag: '🇮🇹' },
21
- { code: 'ja-JP', name: 'Japanese', nativeName: '日本語', flag: '🇯🇵' },
22
- { code: 'ko-KR', name: 'Korean', nativeName: '한국어', flag: '🇰🇷' },
23
- { code: 'ms-MY', name: 'Malay', nativeName: 'Bahasa Melayu', flag: '🇲🇾' },
24
- { code: 'nl-NL', name: 'Dutch', nativeName: 'Nederlands', flag: '🇳🇱' },
25
- { code: 'no-NO', name: 'Norwegian', nativeName: 'Norsk', flag: '🇳🇴' },
26
- { code: 'pl-PL', name: 'Polish', nativeName: 'Polski', flag: '🇵🇱' },
27
- { code: 'pt-PT', name: 'Portuguese', nativeName: 'Português', flag: '🇵🇹' },
28
- { code: 'ro-RO', name: 'Romanian', nativeName: 'Română', flag: '🇷🇴' },
29
- { code: 'ru-RU', name: 'Russian', nativeName: 'Русский', flag: '🇷🇺' },
30
- { code: 'sv-SE', name: 'Swedish', nativeName: 'Svenska', flag: '🇸🇪' },
31
- { code: 'th-TH', name: 'Thai', nativeName: 'ไทย', flag: '🇹🇭' },
32
- { code: 'tl-PH', name: 'Filipino', nativeName: 'Filipino', flag: '🇵🇭' },
33
- { code: 'tr-TR', name: 'Turkish', nativeName: 'Türkçe', flag: '🇹🇷' },
34
- { code: 'uk-UA', name: 'Ukrainian', nativeName: 'Українська', flag: '🇺🇦' },
35
- { code: 'vi-VN', name: 'Vietnamese', nativeName: 'Tiếng Việt', flag: '🇻🇳' },
36
- { code: 'zh-CN', name: 'Chinese (Simplified)', nativeName: '简体中文', flag: '🇨🇳' },
37
- ];
38
- /**
39
- * Get language by code
40
- */
41
- export const getLanguageByCode = (code) => {
42
- return LANGUAGES.find(lang => lang.code === code);
43
- };
44
- /**
45
- * Get default language (en-US)
46
- */
47
- export const getDefaultLanguage = () => {
48
- return LANGUAGES.find(lang => lang.code === 'en-US');
49
- };
50
- /**
51
- * Search languages by name or native name
52
- */
53
- export const searchLanguages = (query) => {
54
- const lowerQuery = query.toLowerCase();
55
- return LANGUAGES.filter(lang => lang.name.toLowerCase().includes(lowerQuery) ||
56
- lang.nativeName.toLowerCase().includes(lowerQuery));
57
- };
58
- //# sourceMappingURL=languagesData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"languagesData.js","sourceRoot":"","sources":["../../../src/infrastructure/config/languagesData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACtE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3E,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACrE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;IACpE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACtE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,E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