@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.
Files changed (581) hide show
  1. package/package.json +1 -6
  2. package/scripts/createLocaleLoaders.js +35 -28
  3. package/scripts/setup-languages.js +113 -0
  4. package/src/infrastructure/config/i18n.ts +2 -34
  5. package/src/infrastructure/config/languages.ts +0 -1
  6. package/src/infrastructure/locales/en-US/index.ts +33 -39
  7. package/src/infrastructure/storage/AsyncStorageWrapper.ts +1 -2
  8. package/src/infrastructure/storage/LocalizationStore.ts +0 -62
  9. package/lib/domain/repositories/ILocalizationRepository.d.ts +0 -17
  10. package/lib/domain/repositories/ILocalizationRepository.d.ts.map +0 -1
  11. package/lib/domain/repositories/ILocalizationRepository.js +0 -6
  12. package/lib/domain/repositories/ILocalizationRepository.js.map +0 -1
  13. package/lib/index.d.ts +0 -13
  14. package/lib/index.d.ts.map +0 -1
  15. package/lib/index.js +0 -15
  16. package/lib/index.js.map +0 -1
  17. package/lib/infrastructure/components/LanguageSwitcher.d.ts +0 -12
  18. package/lib/infrastructure/components/LanguageSwitcher.d.ts.map +0 -1
  19. package/lib/infrastructure/components/LanguageSwitcher.js +0 -49
  20. package/lib/infrastructure/components/LanguageSwitcher.js.map +0 -1
  21. package/lib/infrastructure/components/LocalizationProvider.d.ts +0 -11
  22. package/lib/infrastructure/components/LocalizationProvider.d.ts.map +0 -1
  23. package/lib/infrastructure/components/LocalizationProvider.js +0 -14
  24. package/lib/infrastructure/components/LocalizationProvider.js.map +0 -1
  25. package/lib/infrastructure/components/useLanguageNavigation.d.ts +0 -6
  26. package/lib/infrastructure/components/useLanguageNavigation.d.ts.map +0 -1
  27. package/lib/infrastructure/components/useLanguageNavigation.js +0 -16
  28. package/lib/infrastructure/components/useLanguageNavigation.js.map +0 -1
  29. package/lib/infrastructure/config/i18n.d.ts +0 -12
  30. package/lib/infrastructure/config/i18n.d.ts.map +0 -1
  31. package/lib/infrastructure/config/i18n.js +0 -269
  32. package/lib/infrastructure/config/i18n.js.map +0 -1
  33. package/lib/infrastructure/config/languages.d.ts +0 -39
  34. package/lib/infrastructure/config/languages.d.ts.map +0 -1
  35. package/lib/infrastructure/config/languages.js +0 -210
  36. package/lib/infrastructure/config/languages.js.map +0 -1
  37. package/lib/infrastructure/config/languagesData.d.ts +0 -26
  38. package/lib/infrastructure/config/languagesData.d.ts.map +0 -1
  39. package/lib/infrastructure/config/languagesData.js +0 -58
  40. package/lib/infrastructure/config/languagesData.js.map +0 -1
  41. package/lib/infrastructure/locales/ar-SA/index.d.ts +0 -34
  42. package/lib/infrastructure/locales/ar-SA/index.d.ts.map +0 -1
  43. package/lib/infrastructure/locales/ar-SA/index.js +0 -47
  44. package/lib/infrastructure/locales/ar-SA/index.js.map +0 -1
  45. package/lib/infrastructure/locales/bg-BG/index.d.ts +0 -34
  46. package/lib/infrastructure/locales/bg-BG/index.d.ts.map +0 -1
  47. package/lib/infrastructure/locales/bg-BG/index.js +0 -47
  48. package/lib/infrastructure/locales/bg-BG/index.js.map +0 -1
  49. package/lib/infrastructure/locales/cs-CZ/index.d.ts +0 -34
  50. package/lib/infrastructure/locales/cs-CZ/index.d.ts.map +0 -1
  51. package/lib/infrastructure/locales/cs-CZ/index.js +0 -47
  52. package/lib/infrastructure/locales/cs-CZ/index.js.map +0 -1
  53. package/lib/infrastructure/locales/da-DK/index.d.ts +0 -34
  54. package/lib/infrastructure/locales/da-DK/index.d.ts.map +0 -1
  55. package/lib/infrastructure/locales/da-DK/index.js +0 -47
  56. package/lib/infrastructure/locales/da-DK/index.js.map +0 -1
  57. package/lib/infrastructure/locales/de-DE/index.d.ts +0 -34
  58. package/lib/infrastructure/locales/de-DE/index.d.ts.map +0 -1
  59. package/lib/infrastructure/locales/de-DE/index.js +0 -47
  60. package/lib/infrastructure/locales/de-DE/index.js.map +0 -1
  61. package/lib/infrastructure/locales/el-GR/index.d.ts +0 -34
  62. package/lib/infrastructure/locales/el-GR/index.d.ts.map +0 -1
  63. package/lib/infrastructure/locales/el-GR/index.js +0 -47
  64. package/lib/infrastructure/locales/el-GR/index.js.map +0 -1
  65. package/lib/infrastructure/locales/en-AU/index.d.ts +0 -32
  66. package/lib/infrastructure/locales/en-AU/index.d.ts.map +0 -1
  67. package/lib/infrastructure/locales/en-AU/index.js +0 -44
  68. package/lib/infrastructure/locales/en-AU/index.js.map +0 -1
  69. package/lib/infrastructure/locales/en-CA/index.d.ts +0 -32
  70. package/lib/infrastructure/locales/en-CA/index.d.ts.map +0 -1
  71. package/lib/infrastructure/locales/en-CA/index.js +0 -44
  72. package/lib/infrastructure/locales/en-CA/index.js.map +0 -1
  73. package/lib/infrastructure/locales/en-GB/index.d.ts +0 -32
  74. package/lib/infrastructure/locales/en-GB/index.d.ts.map +0 -1
  75. package/lib/infrastructure/locales/en-GB/index.js +0 -44
  76. package/lib/infrastructure/locales/en-GB/index.js.map +0 -1
  77. package/lib/infrastructure/locales/en-US/index.d.ts +0 -34
  78. package/lib/infrastructure/locales/en-US/index.d.ts.map +0 -1
  79. package/lib/infrastructure/locales/en-US/index.js +0 -47
  80. package/lib/infrastructure/locales/en-US/index.js.map +0 -1
  81. package/lib/infrastructure/locales/es-ES/index.d.ts +0 -34
  82. package/lib/infrastructure/locales/es-ES/index.d.ts.map +0 -1
  83. package/lib/infrastructure/locales/es-ES/index.js +0 -47
  84. package/lib/infrastructure/locales/es-ES/index.js.map +0 -1
  85. package/lib/infrastructure/locales/es-MX/index.d.ts +0 -34
  86. package/lib/infrastructure/locales/es-MX/index.d.ts.map +0 -1
  87. package/lib/infrastructure/locales/es-MX/index.js +0 -47
  88. package/lib/infrastructure/locales/es-MX/index.js.map +0 -1
  89. package/lib/infrastructure/locales/fi-FI/index.d.ts +0 -34
  90. package/lib/infrastructure/locales/fi-FI/index.d.ts.map +0 -1
  91. package/lib/infrastructure/locales/fi-FI/index.js +0 -47
  92. package/lib/infrastructure/locales/fi-FI/index.js.map +0 -1
  93. package/lib/infrastructure/locales/fr-CA/index.d.ts +0 -34
  94. package/lib/infrastructure/locales/fr-CA/index.d.ts.map +0 -1
  95. package/lib/infrastructure/locales/fr-CA/index.js +0 -47
  96. package/lib/infrastructure/locales/fr-CA/index.js.map +0 -1
  97. package/lib/infrastructure/locales/fr-FR/index.d.ts +0 -34
  98. package/lib/infrastructure/locales/fr-FR/index.d.ts.map +0 -1
  99. package/lib/infrastructure/locales/fr-FR/index.js +0 -47
  100. package/lib/infrastructure/locales/fr-FR/index.js.map +0 -1
  101. package/lib/infrastructure/locales/hi-IN/index.d.ts +0 -34
  102. package/lib/infrastructure/locales/hi-IN/index.d.ts.map +0 -1
  103. package/lib/infrastructure/locales/hi-IN/index.js +0 -47
  104. package/lib/infrastructure/locales/hi-IN/index.js.map +0 -1
  105. package/lib/infrastructure/locales/hr-HR/index.d.ts +0 -34
  106. package/lib/infrastructure/locales/hr-HR/index.d.ts.map +0 -1
  107. package/lib/infrastructure/locales/hr-HR/index.js +0 -47
  108. package/lib/infrastructure/locales/hr-HR/index.js.map +0 -1
  109. package/lib/infrastructure/locales/hu-HU/index.d.ts +0 -34
  110. package/lib/infrastructure/locales/hu-HU/index.d.ts.map +0 -1
  111. package/lib/infrastructure/locales/hu-HU/index.js +0 -47
  112. package/lib/infrastructure/locales/hu-HU/index.js.map +0 -1
  113. package/lib/infrastructure/locales/id-ID/index.d.ts +0 -34
  114. package/lib/infrastructure/locales/id-ID/index.d.ts.map +0 -1
  115. package/lib/infrastructure/locales/id-ID/index.js +0 -47
  116. package/lib/infrastructure/locales/id-ID/index.js.map +0 -1
  117. package/lib/infrastructure/locales/it-IT/index.d.ts +0 -34
  118. package/lib/infrastructure/locales/it-IT/index.d.ts.map +0 -1
  119. package/lib/infrastructure/locales/it-IT/index.js +0 -47
  120. package/lib/infrastructure/locales/it-IT/index.js.map +0 -1
  121. package/lib/infrastructure/locales/ja-JP/index.d.ts +0 -34
  122. package/lib/infrastructure/locales/ja-JP/index.d.ts.map +0 -1
  123. package/lib/infrastructure/locales/ja-JP/index.js +0 -47
  124. package/lib/infrastructure/locales/ja-JP/index.js.map +0 -1
  125. package/lib/infrastructure/locales/ko-KR/index.d.ts +0 -34
  126. package/lib/infrastructure/locales/ko-KR/index.d.ts.map +0 -1
  127. package/lib/infrastructure/locales/ko-KR/index.js +0 -47
  128. package/lib/infrastructure/locales/ko-KR/index.js.map +0 -1
  129. package/lib/infrastructure/locales/ms-MY/index.d.ts +0 -34
  130. package/lib/infrastructure/locales/ms-MY/index.d.ts.map +0 -1
  131. package/lib/infrastructure/locales/ms-MY/index.js +0 -47
  132. package/lib/infrastructure/locales/ms-MY/index.js.map +0 -1
  133. package/lib/infrastructure/locales/nl-NL/index.d.ts +0 -34
  134. package/lib/infrastructure/locales/nl-NL/index.d.ts.map +0 -1
  135. package/lib/infrastructure/locales/nl-NL/index.js +0 -47
  136. package/lib/infrastructure/locales/nl-NL/index.js.map +0 -1
  137. package/lib/infrastructure/locales/no-NO/index.d.ts +0 -34
  138. package/lib/infrastructure/locales/no-NO/index.d.ts.map +0 -1
  139. package/lib/infrastructure/locales/no-NO/index.js +0 -47
  140. package/lib/infrastructure/locales/no-NO/index.js.map +0 -1
  141. package/lib/infrastructure/locales/pl-PL/index.d.ts +0 -34
  142. package/lib/infrastructure/locales/pl-PL/index.d.ts.map +0 -1
  143. package/lib/infrastructure/locales/pl-PL/index.js +0 -47
  144. package/lib/infrastructure/locales/pl-PL/index.js.map +0 -1
  145. package/lib/infrastructure/locales/pt-BR/index.d.ts +0 -34
  146. package/lib/infrastructure/locales/pt-BR/index.d.ts.map +0 -1
  147. package/lib/infrastructure/locales/pt-BR/index.js +0 -47
  148. package/lib/infrastructure/locales/pt-BR/index.js.map +0 -1
  149. package/lib/infrastructure/locales/pt-PT/index.d.ts +0 -34
  150. package/lib/infrastructure/locales/pt-PT/index.d.ts.map +0 -1
  151. package/lib/infrastructure/locales/pt-PT/index.js +0 -47
  152. package/lib/infrastructure/locales/pt-PT/index.js.map +0 -1
  153. package/lib/infrastructure/locales/ro-RO/index.d.ts +0 -34
  154. package/lib/infrastructure/locales/ro-RO/index.d.ts.map +0 -1
  155. package/lib/infrastructure/locales/ro-RO/index.js +0 -47
  156. package/lib/infrastructure/locales/ro-RO/index.js.map +0 -1
  157. package/lib/infrastructure/locales/ru-RU/index.d.ts +0 -34
  158. package/lib/infrastructure/locales/ru-RU/index.d.ts.map +0 -1
  159. package/lib/infrastructure/locales/ru-RU/index.js +0 -47
  160. package/lib/infrastructure/locales/ru-RU/index.js.map +0 -1
  161. package/lib/infrastructure/locales/sk-SK/index.d.ts +0 -34
  162. package/lib/infrastructure/locales/sk-SK/index.d.ts.map +0 -1
  163. package/lib/infrastructure/locales/sk-SK/index.js +0 -47
  164. package/lib/infrastructure/locales/sk-SK/index.js.map +0 -1
  165. package/lib/infrastructure/locales/sv-SE/index.d.ts +0 -34
  166. package/lib/infrastructure/locales/sv-SE/index.d.ts.map +0 -1
  167. package/lib/infrastructure/locales/sv-SE/index.js +0 -47
  168. package/lib/infrastructure/locales/sv-SE/index.js.map +0 -1
  169. package/lib/infrastructure/locales/th-TH/index.d.ts +0 -34
  170. package/lib/infrastructure/locales/th-TH/index.d.ts.map +0 -1
  171. package/lib/infrastructure/locales/th-TH/index.js +0 -47
  172. package/lib/infrastructure/locales/th-TH/index.js.map +0 -1
  173. package/lib/infrastructure/locales/tl-PH/index.d.ts +0 -34
  174. package/lib/infrastructure/locales/tl-PH/index.d.ts.map +0 -1
  175. package/lib/infrastructure/locales/tl-PH/index.js +0 -47
  176. package/lib/infrastructure/locales/tl-PH/index.js.map +0 -1
  177. package/lib/infrastructure/locales/tr-TR/index.d.ts +0 -34
  178. package/lib/infrastructure/locales/tr-TR/index.d.ts.map +0 -1
  179. package/lib/infrastructure/locales/tr-TR/index.js +0 -47
  180. package/lib/infrastructure/locales/tr-TR/index.js.map +0 -1
  181. package/lib/infrastructure/locales/uk-UA/index.d.ts +0 -34
  182. package/lib/infrastructure/locales/uk-UA/index.d.ts.map +0 -1
  183. package/lib/infrastructure/locales/uk-UA/index.js +0 -47
  184. package/lib/infrastructure/locales/uk-UA/index.js.map +0 -1
  185. package/lib/infrastructure/locales/vi-VN/index.d.ts +0 -34
  186. package/lib/infrastructure/locales/vi-VN/index.d.ts.map +0 -1
  187. package/lib/infrastructure/locales/vi-VN/index.js +0 -47
  188. package/lib/infrastructure/locales/vi-VN/index.js.map +0 -1
  189. package/lib/infrastructure/locales/zh-CN/index.d.ts +0 -34
  190. package/lib/infrastructure/locales/zh-CN/index.d.ts.map +0 -1
  191. package/lib/infrastructure/locales/zh-CN/index.js +0 -47
  192. package/lib/infrastructure/locales/zh-CN/index.js.map +0 -1
  193. package/lib/infrastructure/locales/zh-TW/index.d.ts +0 -34
  194. package/lib/infrastructure/locales/zh-TW/index.d.ts.map +0 -1
  195. package/lib/infrastructure/locales/zh-TW/index.js +0 -47
  196. package/lib/infrastructure/locales/zh-TW/index.js.map +0 -1
  197. package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts +0 -12
  198. package/lib/infrastructure/storage/AsyncStorageWrapper.d.ts.map +0 -1
  199. package/lib/infrastructure/storage/AsyncStorageWrapper.js +0 -29
  200. package/lib/infrastructure/storage/AsyncStorageWrapper.js.map +0 -1
  201. package/lib/infrastructure/storage/LocalizationStore.d.ts +0 -31
  202. package/lib/infrastructure/storage/LocalizationStore.d.ts.map +0 -1
  203. package/lib/infrastructure/storage/LocalizationStore.js +0 -192
  204. package/lib/infrastructure/storage/LocalizationStore.js.map +0 -1
  205. package/src/infrastructure/locales/ar-SA/auth.json +0 -32
  206. package/src/infrastructure/locales/ar-SA/branding.json +0 -9
  207. package/src/infrastructure/locales/ar-SA/datetime.json +0 -140
  208. package/src/infrastructure/locales/ar-SA/errors.json +0 -43
  209. package/src/infrastructure/locales/ar-SA/flashcards.json +0 -287
  210. package/src/infrastructure/locales/ar-SA/general.json +0 -61
  211. package/src/infrastructure/locales/ar-SA/index.ts +0 -49
  212. package/src/infrastructure/locales/ar-SA/navigation.json +0 -58
  213. package/src/infrastructure/locales/ar-SA/onboarding.json +0 -76
  214. package/src/infrastructure/locales/ar-SA/settings.json +0 -53
  215. package/src/infrastructure/locales/bg-BG/auth.json +0 -32
  216. package/src/infrastructure/locales/bg-BG/branding.json +0 -9
  217. package/src/infrastructure/locales/bg-BG/datetime.json +0 -140
  218. package/src/infrastructure/locales/bg-BG/errors.json +0 -43
  219. package/src/infrastructure/locales/bg-BG/flashcards.json +0 -287
  220. package/src/infrastructure/locales/bg-BG/general.json +0 -61
  221. package/src/infrastructure/locales/bg-BG/index.ts +0 -49
  222. package/src/infrastructure/locales/bg-BG/navigation.json +0 -58
  223. package/src/infrastructure/locales/bg-BG/onboarding.json +0 -76
  224. package/src/infrastructure/locales/bg-BG/settings.json +0 -53
  225. package/src/infrastructure/locales/cs-CZ/auth.json +0 -32
  226. package/src/infrastructure/locales/cs-CZ/branding.json +0 -9
  227. package/src/infrastructure/locales/cs-CZ/datetime.json +0 -140
  228. package/src/infrastructure/locales/cs-CZ/errors.json +0 -43
  229. package/src/infrastructure/locales/cs-CZ/flashcards.json +0 -287
  230. package/src/infrastructure/locales/cs-CZ/general.json +0 -61
  231. package/src/infrastructure/locales/cs-CZ/index.ts +0 -49
  232. package/src/infrastructure/locales/cs-CZ/navigation.json +0 -58
  233. package/src/infrastructure/locales/cs-CZ/onboarding.json +0 -76
  234. package/src/infrastructure/locales/cs-CZ/settings.json +0 -53
  235. package/src/infrastructure/locales/da-DK/auth.json +0 -32
  236. package/src/infrastructure/locales/da-DK/branding.json +0 -9
  237. package/src/infrastructure/locales/da-DK/datetime.json +0 -140
  238. package/src/infrastructure/locales/da-DK/errors.json +0 -43
  239. package/src/infrastructure/locales/da-DK/flashcards.json +0 -287
  240. package/src/infrastructure/locales/da-DK/general.json +0 -61
  241. package/src/infrastructure/locales/da-DK/index.ts +0 -49
  242. package/src/infrastructure/locales/da-DK/navigation.json +0 -58
  243. package/src/infrastructure/locales/da-DK/onboarding.json +0 -76
  244. package/src/infrastructure/locales/da-DK/settings.json +0 -53
  245. package/src/infrastructure/locales/de-DE/auth.json +0 -32
  246. package/src/infrastructure/locales/de-DE/branding.json +0 -9
  247. package/src/infrastructure/locales/de-DE/datetime.json +0 -140
  248. package/src/infrastructure/locales/de-DE/errors.json +0 -43
  249. package/src/infrastructure/locales/de-DE/flashcards.json +0 -287
  250. package/src/infrastructure/locales/de-DE/general.json +0 -61
  251. package/src/infrastructure/locales/de-DE/index.ts +0 -49
  252. package/src/infrastructure/locales/de-DE/navigation.json +0 -58
  253. package/src/infrastructure/locales/de-DE/onboarding.json +0 -76
  254. package/src/infrastructure/locales/de-DE/settings.json +0 -53
  255. package/src/infrastructure/locales/el-GR/auth.json +0 -32
  256. package/src/infrastructure/locales/el-GR/branding.json +0 -9
  257. package/src/infrastructure/locales/el-GR/datetime.json +0 -140
  258. package/src/infrastructure/locales/el-GR/errors.json +0 -43
  259. package/src/infrastructure/locales/el-GR/flashcards.json +0 -287
  260. package/src/infrastructure/locales/el-GR/general.json +0 -61
  261. package/src/infrastructure/locales/el-GR/index.ts +0 -49
  262. package/src/infrastructure/locales/el-GR/navigation.json +0 -58
  263. package/src/infrastructure/locales/el-GR/onboarding.json +0 -76
  264. package/src/infrastructure/locales/el-GR/settings.json +0 -53
  265. package/src/infrastructure/locales/en-AU/branding.json +0 -11
  266. package/src/infrastructure/locales/en-AU/datetime.json +0 -140
  267. package/src/infrastructure/locales/en-AU/errors.json +0 -43
  268. package/src/infrastructure/locales/en-AU/flashcards.json +0 -83
  269. package/src/infrastructure/locales/en-AU/general.json +0 -61
  270. package/src/infrastructure/locales/en-AU/index.ts +0 -46
  271. package/src/infrastructure/locales/en-AU/navigation.json +0 -58
  272. package/src/infrastructure/locales/en-AU/onboarding.json +0 -76
  273. package/src/infrastructure/locales/en-AU/settings.json +0 -53
  274. package/src/infrastructure/locales/en-CA/branding.json +0 -11
  275. package/src/infrastructure/locales/en-CA/datetime.json +0 -140
  276. package/src/infrastructure/locales/en-CA/errors.json +0 -43
  277. package/src/infrastructure/locales/en-CA/flashcards.json +0 -83
  278. package/src/infrastructure/locales/en-CA/general.json +0 -61
  279. package/src/infrastructure/locales/en-CA/index.ts +0 -46
  280. package/src/infrastructure/locales/en-CA/navigation.json +0 -58
  281. package/src/infrastructure/locales/en-CA/onboarding.json +0 -76
  282. package/src/infrastructure/locales/en-CA/settings.json +0 -53
  283. package/src/infrastructure/locales/en-GB/branding.json +0 -11
  284. package/src/infrastructure/locales/en-GB/datetime.json +0 -140
  285. package/src/infrastructure/locales/en-GB/errors.json +0 -43
  286. package/src/infrastructure/locales/en-GB/flashcards.json +0 -83
  287. package/src/infrastructure/locales/en-GB/general.json +0 -61
  288. package/src/infrastructure/locales/en-GB/index.ts +0 -46
  289. package/src/infrastructure/locales/en-GB/navigation.json +0 -58
  290. package/src/infrastructure/locales/en-GB/onboarding.json +0 -76
  291. package/src/infrastructure/locales/en-GB/settings.json +0 -53
  292. package/src/infrastructure/locales/es-ES/auth.json +0 -32
  293. package/src/infrastructure/locales/es-ES/branding.json +0 -9
  294. package/src/infrastructure/locales/es-ES/datetime.json +0 -140
  295. package/src/infrastructure/locales/es-ES/errors.json +0 -43
  296. package/src/infrastructure/locales/es-ES/flashcards.json +0 -287
  297. package/src/infrastructure/locales/es-ES/general.json +0 -61
  298. package/src/infrastructure/locales/es-ES/index.ts +0 -49
  299. package/src/infrastructure/locales/es-ES/navigation.json +0 -58
  300. package/src/infrastructure/locales/es-ES/onboarding.json +0 -76
  301. package/src/infrastructure/locales/es-ES/settings.json +0 -53
  302. package/src/infrastructure/locales/es-MX/auth.json +0 -32
  303. package/src/infrastructure/locales/es-MX/branding.json +0 -9
  304. package/src/infrastructure/locales/es-MX/datetime.json +0 -140
  305. package/src/infrastructure/locales/es-MX/errors.json +0 -43
  306. package/src/infrastructure/locales/es-MX/flashcards.json +0 -276
  307. package/src/infrastructure/locales/es-MX/general.json +0 -61
  308. package/src/infrastructure/locales/es-MX/index.ts +0 -49
  309. package/src/infrastructure/locales/es-MX/navigation.json +0 -58
  310. package/src/infrastructure/locales/es-MX/onboarding.json +0 -76
  311. package/src/infrastructure/locales/es-MX/settings.json +0 -53
  312. package/src/infrastructure/locales/fi-FI/auth.json +0 -32
  313. package/src/infrastructure/locales/fi-FI/branding.json +0 -9
  314. package/src/infrastructure/locales/fi-FI/datetime.json +0 -140
  315. package/src/infrastructure/locales/fi-FI/errors.json +0 -43
  316. package/src/infrastructure/locales/fi-FI/flashcards.json +0 -287
  317. package/src/infrastructure/locales/fi-FI/general.json +0 -61
  318. package/src/infrastructure/locales/fi-FI/index.ts +0 -49
  319. package/src/infrastructure/locales/fi-FI/navigation.json +0 -58
  320. package/src/infrastructure/locales/fi-FI/onboarding.json +0 -76
  321. package/src/infrastructure/locales/fi-FI/settings.json +0 -53
  322. package/src/infrastructure/locales/fr-CA/auth.json +0 -32
  323. package/src/infrastructure/locales/fr-CA/branding.json +0 -9
  324. package/src/infrastructure/locales/fr-CA/datetime.json +0 -140
  325. package/src/infrastructure/locales/fr-CA/errors.json +0 -43
  326. package/src/infrastructure/locales/fr-CA/flashcards.json +0 -287
  327. package/src/infrastructure/locales/fr-CA/general.json +0 -61
  328. package/src/infrastructure/locales/fr-CA/index.ts +0 -49
  329. package/src/infrastructure/locales/fr-CA/navigation.json +0 -58
  330. package/src/infrastructure/locales/fr-CA/onboarding.json +0 -76
  331. package/src/infrastructure/locales/fr-CA/settings.json +0 -53
  332. package/src/infrastructure/locales/fr-FR/auth.json +0 -32
  333. package/src/infrastructure/locales/fr-FR/branding.json +0 -9
  334. package/src/infrastructure/locales/fr-FR/datetime.json +0 -140
  335. package/src/infrastructure/locales/fr-FR/errors.json +0 -43
  336. package/src/infrastructure/locales/fr-FR/flashcards.json +0 -287
  337. package/src/infrastructure/locales/fr-FR/general.json +0 -61
  338. package/src/infrastructure/locales/fr-FR/index.ts +0 -49
  339. package/src/infrastructure/locales/fr-FR/navigation.json +0 -58
  340. package/src/infrastructure/locales/fr-FR/onboarding.json +0 -76
  341. package/src/infrastructure/locales/fr-FR/settings.json +0 -53
  342. package/src/infrastructure/locales/hi-IN/auth.json +0 -32
  343. package/src/infrastructure/locales/hi-IN/branding.json +0 -9
  344. package/src/infrastructure/locales/hi-IN/datetime.json +0 -140
  345. package/src/infrastructure/locales/hi-IN/errors.json +0 -43
  346. package/src/infrastructure/locales/hi-IN/flashcards.json +0 -287
  347. package/src/infrastructure/locales/hi-IN/general.json +0 -61
  348. package/src/infrastructure/locales/hi-IN/index.ts +0 -49
  349. package/src/infrastructure/locales/hi-IN/navigation.json +0 -58
  350. package/src/infrastructure/locales/hi-IN/onboarding.json +0 -76
  351. package/src/infrastructure/locales/hi-IN/settings.json +0 -53
  352. package/src/infrastructure/locales/hr-HR/auth.json +0 -32
  353. package/src/infrastructure/locales/hr-HR/branding.json +0 -9
  354. package/src/infrastructure/locales/hr-HR/datetime.json +0 -140
  355. package/src/infrastructure/locales/hr-HR/errors.json +0 -43
  356. package/src/infrastructure/locales/hr-HR/flashcards.json +0 -276
  357. package/src/infrastructure/locales/hr-HR/general.json +0 -61
  358. package/src/infrastructure/locales/hr-HR/index.ts +0 -49
  359. package/src/infrastructure/locales/hr-HR/navigation.json +0 -58
  360. package/src/infrastructure/locales/hr-HR/onboarding.json +0 -76
  361. package/src/infrastructure/locales/hr-HR/settings.json +0 -53
  362. package/src/infrastructure/locales/hu-HU/auth.json +0 -32
  363. package/src/infrastructure/locales/hu-HU/branding.json +0 -9
  364. package/src/infrastructure/locales/hu-HU/datetime.json +0 -140
  365. package/src/infrastructure/locales/hu-HU/errors.json +0 -43
  366. package/src/infrastructure/locales/hu-HU/flashcards.json +0 -287
  367. package/src/infrastructure/locales/hu-HU/general.json +0 -61
  368. package/src/infrastructure/locales/hu-HU/index.ts +0 -49
  369. package/src/infrastructure/locales/hu-HU/navigation.json +0 -58
  370. package/src/infrastructure/locales/hu-HU/onboarding.json +0 -76
  371. package/src/infrastructure/locales/hu-HU/settings.json +0 -53
  372. package/src/infrastructure/locales/id-ID/auth.json +0 -32
  373. package/src/infrastructure/locales/id-ID/branding.json +0 -9
  374. package/src/infrastructure/locales/id-ID/datetime.json +0 -140
  375. package/src/infrastructure/locales/id-ID/errors.json +0 -43
  376. package/src/infrastructure/locales/id-ID/flashcards.json +0 -287
  377. package/src/infrastructure/locales/id-ID/general.json +0 -61
  378. package/src/infrastructure/locales/id-ID/index.ts +0 -49
  379. package/src/infrastructure/locales/id-ID/navigation.json +0 -58
  380. package/src/infrastructure/locales/id-ID/onboarding.json +0 -76
  381. package/src/infrastructure/locales/id-ID/settings.json +0 -53
  382. package/src/infrastructure/locales/it-IT/auth.json +0 -32
  383. package/src/infrastructure/locales/it-IT/branding.json +0 -9
  384. package/src/infrastructure/locales/it-IT/datetime.json +0 -140
  385. package/src/infrastructure/locales/it-IT/errors.json +0 -43
  386. package/src/infrastructure/locales/it-IT/flashcards.json +0 -287
  387. package/src/infrastructure/locales/it-IT/general.json +0 -61
  388. package/src/infrastructure/locales/it-IT/index.ts +0 -49
  389. package/src/infrastructure/locales/it-IT/navigation.json +0 -58
  390. package/src/infrastructure/locales/it-IT/onboarding.json +0 -76
  391. package/src/infrastructure/locales/it-IT/settings.json +0 -53
  392. package/src/infrastructure/locales/ja-JP/auth.json +0 -32
  393. package/src/infrastructure/locales/ja-JP/branding.json +0 -9
  394. package/src/infrastructure/locales/ja-JP/datetime.json +0 -140
  395. package/src/infrastructure/locales/ja-JP/errors.json +0 -43
  396. package/src/infrastructure/locales/ja-JP/flashcards.json +0 -287
  397. package/src/infrastructure/locales/ja-JP/general.json +0 -61
  398. package/src/infrastructure/locales/ja-JP/index.ts +0 -49
  399. package/src/infrastructure/locales/ja-JP/navigation.json +0 -58
  400. package/src/infrastructure/locales/ja-JP/onboarding.json +0 -76
  401. package/src/infrastructure/locales/ja-JP/settings.json +0 -53
  402. package/src/infrastructure/locales/ko-KR/auth.json +0 -32
  403. package/src/infrastructure/locales/ko-KR/branding.json +0 -9
  404. package/src/infrastructure/locales/ko-KR/datetime.json +0 -140
  405. package/src/infrastructure/locales/ko-KR/errors.json +0 -43
  406. package/src/infrastructure/locales/ko-KR/flashcards.json +0 -287
  407. package/src/infrastructure/locales/ko-KR/general.json +0 -61
  408. package/src/infrastructure/locales/ko-KR/index.ts +0 -49
  409. package/src/infrastructure/locales/ko-KR/navigation.json +0 -58
  410. package/src/infrastructure/locales/ko-KR/onboarding.json +0 -76
  411. package/src/infrastructure/locales/ko-KR/settings.json +0 -53
  412. package/src/infrastructure/locales/ms-MY/auth.json +0 -32
  413. package/src/infrastructure/locales/ms-MY/branding.json +0 -9
  414. package/src/infrastructure/locales/ms-MY/datetime.json +0 -140
  415. package/src/infrastructure/locales/ms-MY/errors.json +0 -43
  416. package/src/infrastructure/locales/ms-MY/flashcards.json +0 -287
  417. package/src/infrastructure/locales/ms-MY/general.json +0 -61
  418. package/src/infrastructure/locales/ms-MY/index.ts +0 -49
  419. package/src/infrastructure/locales/ms-MY/navigation.json +0 -58
  420. package/src/infrastructure/locales/ms-MY/onboarding.json +0 -76
  421. package/src/infrastructure/locales/ms-MY/settings.json +0 -53
  422. package/src/infrastructure/locales/nl-NL/auth.json +0 -32
  423. package/src/infrastructure/locales/nl-NL/branding.json +0 -9
  424. package/src/infrastructure/locales/nl-NL/datetime.json +0 -140
  425. package/src/infrastructure/locales/nl-NL/errors.json +0 -43
  426. package/src/infrastructure/locales/nl-NL/flashcards.json +0 -287
  427. package/src/infrastructure/locales/nl-NL/general.json +0 -61
  428. package/src/infrastructure/locales/nl-NL/index.ts +0 -49
  429. package/src/infrastructure/locales/nl-NL/navigation.json +0 -58
  430. package/src/infrastructure/locales/nl-NL/onboarding.json +0 -76
  431. package/src/infrastructure/locales/nl-NL/settings.json +0 -53
  432. package/src/infrastructure/locales/no-NO/auth.json +0 -32
  433. package/src/infrastructure/locales/no-NO/branding.json +0 -9
  434. package/src/infrastructure/locales/no-NO/datetime.json +0 -140
  435. package/src/infrastructure/locales/no-NO/errors.json +0 -43
  436. package/src/infrastructure/locales/no-NO/flashcards.json +0 -287
  437. package/src/infrastructure/locales/no-NO/general.json +0 -61
  438. package/src/infrastructure/locales/no-NO/index.ts +0 -49
  439. package/src/infrastructure/locales/no-NO/navigation.json +0 -58
  440. package/src/infrastructure/locales/no-NO/onboarding.json +0 -76
  441. package/src/infrastructure/locales/no-NO/settings.json +0 -53
  442. package/src/infrastructure/locales/pl-PL/auth.json +0 -32
  443. package/src/infrastructure/locales/pl-PL/branding.json +0 -9
  444. package/src/infrastructure/locales/pl-PL/datetime.json +0 -140
  445. package/src/infrastructure/locales/pl-PL/errors.json +0 -43
  446. package/src/infrastructure/locales/pl-PL/flashcards.json +0 -287
  447. package/src/infrastructure/locales/pl-PL/general.json +0 -61
  448. package/src/infrastructure/locales/pl-PL/index.ts +0 -49
  449. package/src/infrastructure/locales/pl-PL/navigation.json +0 -58
  450. package/src/infrastructure/locales/pl-PL/onboarding.json +0 -76
  451. package/src/infrastructure/locales/pl-PL/settings.json +0 -53
  452. package/src/infrastructure/locales/pt-BR/auth.json +0 -32
  453. package/src/infrastructure/locales/pt-BR/branding.json +0 -9
  454. package/src/infrastructure/locales/pt-BR/datetime.json +0 -140
  455. package/src/infrastructure/locales/pt-BR/errors.json +0 -43
  456. package/src/infrastructure/locales/pt-BR/flashcards.json +0 -287
  457. package/src/infrastructure/locales/pt-BR/general.json +0 -61
  458. package/src/infrastructure/locales/pt-BR/index.ts +0 -49
  459. package/src/infrastructure/locales/pt-BR/navigation.json +0 -58
  460. package/src/infrastructure/locales/pt-BR/onboarding.json +0 -76
  461. package/src/infrastructure/locales/pt-BR/settings.json +0 -53
  462. package/src/infrastructure/locales/pt-PT/auth.json +0 -32
  463. package/src/infrastructure/locales/pt-PT/branding.json +0 -9
  464. package/src/infrastructure/locales/pt-PT/datetime.json +0 -140
  465. package/src/infrastructure/locales/pt-PT/errors.json +0 -43
  466. package/src/infrastructure/locales/pt-PT/flashcards.json +0 -287
  467. package/src/infrastructure/locales/pt-PT/general.json +0 -61
  468. package/src/infrastructure/locales/pt-PT/index.ts +0 -49
  469. package/src/infrastructure/locales/pt-PT/navigation.json +0 -58
  470. package/src/infrastructure/locales/pt-PT/onboarding.json +0 -76
  471. package/src/infrastructure/locales/pt-PT/settings.json +0 -53
  472. package/src/infrastructure/locales/ro-RO/auth.json +0 -32
  473. package/src/infrastructure/locales/ro-RO/branding.json +0 -9
  474. package/src/infrastructure/locales/ro-RO/datetime.json +0 -140
  475. package/src/infrastructure/locales/ro-RO/errors.json +0 -43
  476. package/src/infrastructure/locales/ro-RO/flashcards.json +0 -287
  477. package/src/infrastructure/locales/ro-RO/general.json +0 -61
  478. package/src/infrastructure/locales/ro-RO/index.ts +0 -49
  479. package/src/infrastructure/locales/ro-RO/navigation.json +0 -58
  480. package/src/infrastructure/locales/ro-RO/onboarding.json +0 -76
  481. package/src/infrastructure/locales/ro-RO/settings.json +0 -53
  482. package/src/infrastructure/locales/ru-RU/auth.json +0 -32
  483. package/src/infrastructure/locales/ru-RU/branding.json +0 -9
  484. package/src/infrastructure/locales/ru-RU/datetime.json +0 -140
  485. package/src/infrastructure/locales/ru-RU/errors.json +0 -43
  486. package/src/infrastructure/locales/ru-RU/flashcards.json +0 -276
  487. package/src/infrastructure/locales/ru-RU/general.json +0 -61
  488. package/src/infrastructure/locales/ru-RU/index.ts +0 -49
  489. package/src/infrastructure/locales/ru-RU/navigation.json +0 -58
  490. package/src/infrastructure/locales/ru-RU/onboarding.json +0 -76
  491. package/src/infrastructure/locales/ru-RU/settings.json +0 -53
  492. package/src/infrastructure/locales/sk-SK/auth.json +0 -32
  493. package/src/infrastructure/locales/sk-SK/branding.json +0 -9
  494. package/src/infrastructure/locales/sk-SK/datetime.json +0 -140
  495. package/src/infrastructure/locales/sk-SK/errors.json +0 -43
  496. package/src/infrastructure/locales/sk-SK/flashcards.json +0 -287
  497. package/src/infrastructure/locales/sk-SK/general.json +0 -61
  498. package/src/infrastructure/locales/sk-SK/index.ts +0 -49
  499. package/src/infrastructure/locales/sk-SK/navigation.json +0 -58
  500. package/src/infrastructure/locales/sk-SK/onboarding.json +0 -76
  501. package/src/infrastructure/locales/sk-SK/settings.json +0 -53
  502. package/src/infrastructure/locales/sv-SE/auth.json +0 -32
  503. package/src/infrastructure/locales/sv-SE/branding.json +0 -9
  504. package/src/infrastructure/locales/sv-SE/datetime.json +0 -140
  505. package/src/infrastructure/locales/sv-SE/errors.json +0 -43
  506. package/src/infrastructure/locales/sv-SE/flashcards.json +0 -287
  507. package/src/infrastructure/locales/sv-SE/general.json +0 -61
  508. package/src/infrastructure/locales/sv-SE/index.ts +0 -49
  509. package/src/infrastructure/locales/sv-SE/navigation.json +0 -58
  510. package/src/infrastructure/locales/sv-SE/onboarding.json +0 -76
  511. package/src/infrastructure/locales/sv-SE/settings.json +0 -53
  512. package/src/infrastructure/locales/th-TH/auth.json +0 -32
  513. package/src/infrastructure/locales/th-TH/branding.json +0 -9
  514. package/src/infrastructure/locales/th-TH/datetime.json +0 -140
  515. package/src/infrastructure/locales/th-TH/errors.json +0 -43
  516. package/src/infrastructure/locales/th-TH/flashcards.json +0 -287
  517. package/src/infrastructure/locales/th-TH/general.json +0 -61
  518. package/src/infrastructure/locales/th-TH/index.ts +0 -49
  519. package/src/infrastructure/locales/th-TH/navigation.json +0 -58
  520. package/src/infrastructure/locales/th-TH/onboarding.json +0 -76
  521. package/src/infrastructure/locales/th-TH/settings.json +0 -53
  522. package/src/infrastructure/locales/tl-PH/auth.json +0 -32
  523. package/src/infrastructure/locales/tl-PH/branding.json +0 -9
  524. package/src/infrastructure/locales/tl-PH/datetime.json +0 -140
  525. package/src/infrastructure/locales/tl-PH/errors.json +0 -43
  526. package/src/infrastructure/locales/tl-PH/flashcards.json +0 -287
  527. package/src/infrastructure/locales/tl-PH/general.json +0 -61
  528. package/src/infrastructure/locales/tl-PH/index.ts +0 -49
  529. package/src/infrastructure/locales/tl-PH/navigation.json +0 -58
  530. package/src/infrastructure/locales/tl-PH/onboarding.json +0 -76
  531. package/src/infrastructure/locales/tl-PH/settings.json +0 -53
  532. package/src/infrastructure/locales/tr-TR/auth.json +0 -32
  533. package/src/infrastructure/locales/tr-TR/branding.json +0 -9
  534. package/src/infrastructure/locales/tr-TR/datetime.json +0 -140
  535. package/src/infrastructure/locales/tr-TR/errors.json +0 -43
  536. package/src/infrastructure/locales/tr-TR/flashcards.json +0 -287
  537. package/src/infrastructure/locales/tr-TR/general.json +0 -61
  538. package/src/infrastructure/locales/tr-TR/index.ts +0 -49
  539. package/src/infrastructure/locales/tr-TR/navigation.json +0 -58
  540. package/src/infrastructure/locales/tr-TR/onboarding.json +0 -76
  541. package/src/infrastructure/locales/tr-TR/settings.json +0 -53
  542. package/src/infrastructure/locales/uk-UA/auth.json +0 -32
  543. package/src/infrastructure/locales/uk-UA/branding.json +0 -9
  544. package/src/infrastructure/locales/uk-UA/datetime.json +0 -140
  545. package/src/infrastructure/locales/uk-UA/errors.json +0 -43
  546. package/src/infrastructure/locales/uk-UA/flashcards.json +0 -287
  547. package/src/infrastructure/locales/uk-UA/general.json +0 -61
  548. package/src/infrastructure/locales/uk-UA/index.ts +0 -49
  549. package/src/infrastructure/locales/uk-UA/navigation.json +0 -58
  550. package/src/infrastructure/locales/uk-UA/onboarding.json +0 -76
  551. package/src/infrastructure/locales/uk-UA/settings.json +0 -53
  552. package/src/infrastructure/locales/vi-VN/auth.json +0 -32
  553. package/src/infrastructure/locales/vi-VN/branding.json +0 -9
  554. package/src/infrastructure/locales/vi-VN/datetime.json +0 -140
  555. package/src/infrastructure/locales/vi-VN/errors.json +0 -43
  556. package/src/infrastructure/locales/vi-VN/flashcards.json +0 -287
  557. package/src/infrastructure/locales/vi-VN/general.json +0 -61
  558. package/src/infrastructure/locales/vi-VN/index.ts +0 -49
  559. package/src/infrastructure/locales/vi-VN/navigation.json +0 -58
  560. package/src/infrastructure/locales/vi-VN/onboarding.json +0 -76
  561. package/src/infrastructure/locales/vi-VN/settings.json +0 -53
  562. package/src/infrastructure/locales/zh-CN/auth.json +0 -32
  563. package/src/infrastructure/locales/zh-CN/branding.json +0 -9
  564. package/src/infrastructure/locales/zh-CN/datetime.json +0 -140
  565. package/src/infrastructure/locales/zh-CN/errors.json +0 -43
  566. package/src/infrastructure/locales/zh-CN/flashcards.json +0 -287
  567. package/src/infrastructure/locales/zh-CN/general.json +0 -61
  568. package/src/infrastructure/locales/zh-CN/index.ts +0 -49
  569. package/src/infrastructure/locales/zh-CN/navigation.json +0 -58
  570. package/src/infrastructure/locales/zh-CN/onboarding.json +0 -76
  571. package/src/infrastructure/locales/zh-CN/settings.json +0 -53
  572. package/src/infrastructure/locales/zh-TW/auth.json +0 -32
  573. package/src/infrastructure/locales/zh-TW/branding.json +0 -9
  574. package/src/infrastructure/locales/zh-TW/datetime.json +0 -140
  575. package/src/infrastructure/locales/zh-TW/errors.json +0 -43
  576. package/src/infrastructure/locales/zh-TW/flashcards.json +0 -287
  577. package/src/infrastructure/locales/zh-TW/general.json +0 -61
  578. package/src/infrastructure/locales/zh-TW/index.ts +0 -49
  579. package/src/infrastructure/locales/zh-TW/navigation.json +0 -58
  580. package/src/infrastructure/locales/zh-TW/onboarding.json +0 -76
  581. package/src/infrastructure/locales/zh-TW/settings.json +0 -53
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "@umituz/react-native-localization",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Universal localization system for React Native apps with i18n support",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
7
7
  "scripts": {
8
- "build": "tsc",
9
8
  "typecheck": "tsc --noEmit",
10
9
  "lint": "tsc --noEmit",
11
- "clean": "rm -rf lib",
12
- "prebuild": "npm run clean",
13
- "prepublishOnly": "npm run build",
14
10
  "locales:generate": "node scripts/createLocaleLoaders.js",
15
11
  "locales:generate:lang": "node scripts/createLocaleLoaders.js",
16
12
  "version:patch": "npm version patch -m 'chore: release v%s'",
@@ -71,7 +67,6 @@
71
67
  "access": "public"
72
68
  },
73
69
  "files": [
74
- "lib",
75
70
  "src",
76
71
  "scripts",
77
72
  "README.md",
@@ -81,43 +81,50 @@ function createAutoLoader(languageCode) {
81
81
  return false;
82
82
  }
83
83
 
84
- // Create require statements and namespace mapping
85
- // Use require instead of import for JSON files to ensure proper Metro bundler handling
86
- const requires = [];
87
- const namespaces = [];
88
- const descriptions = [];
89
-
90
- files.forEach(file => {
91
- const moduleName = file.replace('.json', '');
92
- requires.push(`const ${moduleName} = require('./${file}');`);
93
- namespaces.push(moduleName);
94
- descriptions.push(` * - ${moduleName}: ${file}`);
95
- });
96
-
97
- // Create the auto-loader content with nested structure
84
+ // Create the auto-loader content with require.context for automatic discovery
98
85
  const content = `/**
99
- * Auto-generated translation loader for ${languageCode}
86
+ * Auto-loader for ${languageCode} translation modules
100
87
  *
101
- * This file is automatically generated by:
102
- * npm run localization:create-loaders
88
+ * AUTOMATIC TRANSLATION FILE DETECTION:
89
+ * - Uses Metro bundler's require.context to auto-discover .json files
90
+ * - Adding new translation file = just create .json file (zero manual updates)
91
+ * - Build-time resolution (fast, no runtime overhead)
92
+ * - Works for all languages automatically
103
93
  *
104
- * DO NOT EDIT THIS FILE MANUALLY!
94
+ * OFFLINE-ONLY TRANSLATIONS (All domains work without backend):
95
+ * - Automatically imports ALL .json files in this directory
96
+ * - Alphabetically sorted for consistency
97
+ * - Type-safe with TypeScript
105
98
  *
106
- * Translation Modules:
107
- ${descriptions.join('\n')}
99
+ * USAGE:
100
+ * 1. Create new translation file: my_domain.json
101
+ * 2. File is auto-discovered and loaded
102
+ * 3. Access via t('my_domain.key')
103
+ *
104
+ * This file is automatically generated by setup-languages.js or createLocaleLoaders.js
105
+ * but can be manually edited if needed.
108
106
  *
109
107
  * Generated: ${new Date().toISOString()}
110
108
  */
111
109
 
112
- // Import all translation modules
113
- // Use require for JSON files to ensure proper Metro bundler handling
114
- ${requires.join('\n')}
110
+ // Metro bundler require.context - auto-discover all .json files
111
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
112
+ const translationContext = (require as any).context('./', false, /\\.json$/);
115
113
 
116
- // Merge all modules into a single translation object
117
- // Using nested structure for better namespace organization
118
- const translations = {
119
- ${namespaces.join(',\n ')},
120
- };
114
+ /**
115
+ * Load all JSON modules automatically
116
+ * Extracts module name from path (e.g., './auth.json' -> 'auth')
117
+ */
118
+ const translations: Record<string, any> = {};
119
+
120
+ translationContext.keys().forEach((key: string) => {
121
+ // Extract module name from path: './auth.json' -> 'auth'
122
+ const match = key.match(/\\.\\/([^/]+)\\.json$/);
123
+ if (match) {
124
+ const moduleName = match[1];
125
+ translations[moduleName] = translationContext(key);
126
+ }
127
+ });
121
128
 
122
129
  export default translations;
123
130
  `;
@@ -159,9 +159,122 @@ async function setupLanguages() {
159
159
  }
160
160
  }
161
161
 
162
+ // Create index.ts files for all languages (including en-US)
163
+ console.log(`\n📝 Creating index.ts loaders for all languages...`);
164
+ let createdIndexFiles = 0;
165
+
166
+ // Create index.ts for en-US
167
+ const enUSIndexPath = path.join(enUSDir, 'index.ts');
168
+ if (!fs.existsSync(enUSIndexPath)) {
169
+ const enUSIndexContent = `/**
170
+ * Auto-loader for en-US translation modules
171
+ *
172
+ * AUTOMATIC TRANSLATION FILE DETECTION:
173
+ * - Uses Metro bundler's require.context to auto-discover .json files
174
+ * - Adding new translation file = just create .json file (zero manual updates)
175
+ * - Build-time resolution (fast, no runtime overhead)
176
+ * - Works for all languages automatically
177
+ *
178
+ * OFFLINE-ONLY TRANSLATIONS (All domains work without backend):
179
+ * - Automatically imports ALL .json files in this directory
180
+ * - Alphabetically sorted for consistency
181
+ * - Type-safe with TypeScript
182
+ *
183
+ * USAGE:
184
+ * 1. Create new translation file: my_domain.json
185
+ * 2. File is auto-discovered and loaded
186
+ * 3. Access via t('my_domain.key')
187
+ *
188
+ * This file is automatically generated by setup-languages.js
189
+ * but can be manually edited if needed.
190
+ */
191
+
192
+ // Metro bundler require.context - auto-discover all .json files
193
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
194
+ const translationContext = (require as any).context('./', false, /\\.json$/);
195
+
196
+ /**
197
+ * Load all JSON modules automatically
198
+ * Extracts module name from path (e.g., './auth.json' -> 'auth')
199
+ */
200
+ const translations: Record<string, any> = {};
201
+
202
+ translationContext.keys().forEach((key: string) => {
203
+ // Extract module name from path: './auth.json' -> 'auth'
204
+ const match = key.match(/\\.\\/([^/]+)\\.json$/);
205
+ if (match) {
206
+ const moduleName = match[1];
207
+ translations[moduleName] = translationContext(key);
208
+ }
209
+ });
210
+
211
+ export default translations;
212
+ `;
213
+ fs.writeFileSync(enUSIndexPath, enUSIndexContent, 'utf8');
214
+ console.log(` 📄 Created: en-US/index.ts`);
215
+ createdIndexFiles++;
216
+ }
217
+
218
+ // Create index.ts for all other languages
219
+ for (const langCode of LANGUAGES) {
220
+ const langDir = path.join(localesDir, langCode);
221
+ const indexPath = path.join(langDir, 'index.ts');
222
+
223
+ if (fs.existsSync(langDir) && !fs.existsSync(indexPath)) {
224
+ const indexContent = `/**
225
+ * Auto-loader for ${langCode} translation modules
226
+ *
227
+ * AUTOMATIC TRANSLATION FILE DETECTION:
228
+ * - Uses Metro bundler's require.context to auto-discover .json files
229
+ * - Adding new translation file = just create .json file (zero manual updates)
230
+ * - Build-time resolution (fast, no runtime overhead)
231
+ * - Works for all languages automatically
232
+ *
233
+ * OFFLINE-ONLY TRANSLATIONS (All domains work without backend):
234
+ * - Automatically imports ALL .json files in this directory
235
+ * - Alphabetically sorted for consistency
236
+ * - Type-safe with TypeScript
237
+ *
238
+ * USAGE:
239
+ * 1. Create new translation file: my_domain.json
240
+ * 2. File is auto-discovered and loaded
241
+ * 3. Access via t('my_domain.key')
242
+ *
243
+ * This file is automatically generated by setup-languages.js
244
+ * but can be manually edited if needed.
245
+ */
246
+
247
+ // Metro bundler require.context - auto-discover all .json files
248
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
249
+ const translationContext = (require as any).context('./', false, /\\.json$/);
250
+
251
+ /**
252
+ * Load all JSON modules automatically
253
+ * Extracts module name from path (e.g., './auth.json' -> 'auth')
254
+ */
255
+ const translations: Record<string, any> = {};
256
+
257
+ translationContext.keys().forEach((key: string) => {
258
+ // Extract module name from path: './auth.json' -> 'auth'
259
+ const match = key.match(/\\.\\/([^/]+)\\.json$/);
260
+ if (match) {
261
+ const moduleName = match[1];
262
+ translations[moduleName] = translationContext(key);
263
+ }
264
+ });
265
+
266
+ export default translations;
267
+ `;
268
+ fs.writeFileSync(indexPath, indexContent, 'utf8');
269
+ console.log(` 📄 Created: ${langCode}/index.ts`);
270
+ createdIndexFiles++;
271
+ }
272
+ }
273
+
162
274
  console.log(`\n✅ Setup completed!`);
163
275
  console.log(` Directories created: ${createdDirs}`);
164
276
  console.log(` Files created: ${createdFiles}`);
277
+ console.log(` Index files created: ${createdIndexFiles}`);
165
278
  console.log(` Total languages: ${LANGUAGES.length + 1} (including en-US)`);
166
279
  console.log(
167
280
  `\n📝 Next steps:`,
@@ -46,11 +46,8 @@ const loadPackageTranslations = (): Record<string, any> => {
46
46
  try {
47
47
  const translations = packageLocalesContext(key);
48
48
  packageTranslations[languageCode] = translations.default || translations;
49
- /* eslint-disable-next-line no-console */
50
- if (__DEV__) console.log(`[i18n] ✅ Loaded package translations: ${languageCode}`);
51
49
  } catch (error) {
52
- /* eslint-disable-next-line no-console */
53
- if (__DEV__) console.warn(`[i18n] ⚠️ Failed to load package translations for ${languageCode}:`, error);
50
+ // Ignore individual language loading errors
54
51
  }
55
52
  }
56
53
  });
@@ -84,17 +81,11 @@ try {
84
81
  projectTranslations[languageCode] = {};
85
82
  }
86
83
  projectTranslations[languageCode] = translations.default || translations;
87
- /* eslint-disable-next-line no-console */
88
- if (__DEV__) console.log(`[i18n] ✅ Loaded project translations: ${languageCode}`);
89
84
  } catch (error) {
90
- /* eslint-disable-next-line no-console */
91
- if (__DEV__) console.warn(`[i18n] ⚠️ Failed to load project translations for ${languageCode}:`, error);
85
+ // Ignore individual language loading errors
92
86
  }
93
87
  }
94
88
  });
95
-
96
- /* eslint-disable-next-line no-console */
97
- if (__DEV__) console.log('[i18n] ✅ Loaded project translations from DDD structure');
98
89
  } catch (e1) {
99
90
  try {
100
91
  // Try alternative DDD structure path
@@ -116,9 +107,6 @@ try {
116
107
  }
117
108
  }
118
109
  });
119
-
120
- /* eslint-disable-next-line no-console */
121
- if (__DEV__) console.log('[i18n] ✅ Loaded project translations from alternative DDD structure');
122
110
  } catch (e2) {
123
111
  try {
124
112
  // Try simple structure path
@@ -140,13 +128,8 @@ try {
140
128
  }
141
129
  }
142
130
  });
143
-
144
- /* eslint-disable-next-line no-console */
145
- if (__DEV__) console.log('[i18n] ✅ Loaded project translations from simple structure');
146
131
  } catch (e3) {
147
132
  // No project translations found - this is OK, use package defaults only
148
- /* eslint-disable-next-line no-console */
149
- if (__DEV__) console.log('[i18n] ℹ️ No project-specific translations found, using package defaults only');
150
133
  }
151
134
  }
152
135
  }
@@ -209,9 +192,6 @@ const buildResources = (): Record<string, { translation: any }> => {
209
192
  };
210
193
  });
211
194
 
212
- /* eslint-disable-next-line no-console */
213
- if (__DEV__) console.log(`[i18n] 📦 Loaded ${Object.keys(resources).length} languages:`, Object.keys(resources).join(', '));
214
-
215
195
  return resources;
216
196
  };
217
197
 
@@ -227,17 +207,11 @@ const initializeI18n = () => {
227
207
  if (isInitialized) return;
228
208
 
229
209
  try {
230
- /* eslint-disable-next-line no-console */
231
- if (__DEV__) console.log('[i18n] Initializing i18next...');
232
-
233
210
  // Check if initReactI18next is available
234
211
  if (!initReactI18next) {
235
212
  throw new Error('initReactI18next is undefined');
236
213
  }
237
214
 
238
- /* eslint-disable-next-line no-console */
239
- if (__DEV__) console.log('[i18n] initReactI18next found, initializing...');
240
-
241
215
  i18n.use(initReactI18next).init({
242
216
  resources,
243
217
  lng: DEFAULT_LANGUAGE,
@@ -257,14 +231,8 @@ const initializeI18n = () => {
257
231
  });
258
232
 
259
233
  isInitialized = true;
260
- /* eslint-disable-next-line no-console */
261
- if (__DEV__) console.log('[i18n] i18next initialized successfully');
262
234
  } catch (error) {
263
- /* eslint-disable-next-line no-console */
264
- if (__DEV__) console.error('[i18n] Initialization error:', error);
265
235
  // Don't throw - allow app to continue without i18n
266
- /* eslint-disable-next-line no-console */
267
- if (__DEV__) console.warn('[i18n] Continuing without i18n initialization');
268
236
  }
269
237
  };
270
238
 
@@ -242,7 +242,6 @@ export const getDeviceLocale = (): string => {
242
242
  return DEFAULT_LANGUAGE;
243
243
  } catch (error) {
244
244
  // If any error occurs, fallback to default
245
- console.warn('[Localization] Failed to detect device locale:', error);
246
245
  return DEFAULT_LANGUAGE;
247
246
  }
248
247
  };
@@ -1,49 +1,43 @@
1
1
  /**
2
- * Auto-generated translation loader for en-US
2
+ * Auto-loader for en-US translation modules
3
3
  *
4
- * This file is automatically generated by:
5
- * npm run localization:create-loaders
4
+ * AUTOMATIC TRANSLATION FILE DETECTION:
5
+ * - Uses Metro bundler's require.context to auto-discover .json files
6
+ * - Adding new translation file = just create .json file (zero manual updates)
7
+ * - Build-time resolution (fast, no runtime overhead)
8
+ * - Works for all languages automatically
6
9
  *
7
- * DO NOT EDIT THIS FILE MANUALLY!
10
+ * OFFLINE-ONLY TRANSLATIONS (All domains work without backend):
11
+ * - Automatically imports ALL .json files in this directory
12
+ * - Alphabetically sorted for consistency
13
+ * - Type-safe with TypeScript
8
14
  *
9
- * Translation Modules:
10
- * - auth: auth.json
11
- * - branding: branding.json
12
- * - datetime: datetime.json
13
- * - errors: errors.json
14
- * - flashcards: flashcards.json
15
- * - general: general.json
16
- * - navigation: navigation.json
17
- * - onboarding: onboarding.json
18
- * - settings: settings.json
15
+ * USAGE:
16
+ * 1. Create new translation file: my_domain.json
17
+ * 2. File is auto-discovered and loaded
18
+ * 3. Access via t('my_domain.key')
19
19
  *
20
- * Generated: 2025-11-06T20:57:31.290Z
20
+ * This file is automatically generated by setup-languages.js script
21
+ * but can be manually edited if needed.
21
22
  */
22
23
 
23
- // Import all translation modules
24
- // Use require for JSON files to ensure proper Metro bundler handling
25
- const auth = require('./auth.json');
26
- const branding = require('./branding.json');
27
- const datetime = require('./datetime.json');
28
- const errors = require('./errors.json');
29
- const flashcards = require('./flashcards.json');
30
- const general = require('./general.json');
31
- const navigation = require('./navigation.json');
32
- const onboarding = require('./onboarding.json');
33
- const settings = require('./settings.json');
24
+ // Metro bundler require.context - auto-discover all .json files
25
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
26
+ const translationContext = (require as any).context('./', false, /\.json$/);
34
27
 
35
- // Merge all modules into a single translation object
36
- // Using nested structure for better namespace organization
37
- const translations = {
38
- auth,
39
- branding,
40
- datetime,
41
- errors,
42
- flashcards,
43
- general,
44
- navigation,
45
- onboarding,
46
- settings,
47
- };
28
+ /**
29
+ * Load all JSON modules automatically
30
+ * Extracts module name from path (e.g., './auth.json' -> 'auth')
31
+ */
32
+ const translations: Record<string, any> = {};
33
+
34
+ translationContext.keys().forEach((key: string) => {
35
+ // Extract module name from path: './auth.json' -> 'auth'
36
+ const match = key.match(/\.\/([^/]+)\.json$/);
37
+ if (match) {
38
+ const moduleName = match[1];
39
+ translations[moduleName] = translationContext(key);
40
+ }
41
+ });
48
42
 
49
43
  export default translations;
@@ -15,7 +15,6 @@ export const StorageWrapper = {
15
15
  const value = await AsyncStorage.getItem(key);
16
16
  return value ?? defaultValue;
17
17
  } catch (error) {
18
- console.warn('[Localization] Failed to get storage value:', error);
19
18
  return defaultValue;
20
19
  }
21
20
  },
@@ -24,7 +23,7 @@ export const StorageWrapper = {
24
23
  try {
25
24
  await AsyncStorage.setItem(key, value);
26
25
  } catch (error) {
27
- console.warn('[Localization] Failed to set storage value:', error);
26
+ // Ignore storage errors
28
27
  }
29
28
  },
30
29
  };
@@ -33,84 +33,42 @@ export const useLocalizationStore = create<LocalizationState>((set, get) => ({
33
33
  * - Fallback: English (en-US) if device locale not supported
34
34
  */
35
35
  initialize: async () => {
36
- /* eslint-disable-next-line no-console */
37
- if (__DEV__) console.log('[LocalizationStore] Starting initialization...');
38
-
39
36
  try {
40
37
  // ✅ CRITICAL FIX: Don't reset isInitialized if already initialized
41
38
  // This prevents UI flash on re-initialization
42
39
  const { isInitialized: alreadyInitialized } = get();
43
40
  if (alreadyInitialized) {
44
- /* eslint-disable-next-line no-console */
45
- if (__DEV__) console.log('[LocalizationStore] Already initialized, skipping...');
46
41
  return;
47
42
  }
48
43
 
49
- /* eslint-disable-next-line no-console */
50
- if (__DEV__) console.log('[LocalizationStore] Getting saved language preference...');
51
44
  // Get saved language preference
52
45
  const savedLanguage = await StorageWrapper.getString(STORAGE_KEYS.LANGUAGE, DEFAULT_LANGUAGE);
53
- /* eslint-disable-next-line no-console */
54
- if (__DEV__) console.log('[LocalizationStore] Saved language:', savedLanguage);
55
46
 
56
47
  // ✅ DEVICE LOCALE DETECTION: Use device locale on first launch
57
48
  let languageCode: string;
58
49
  if (savedLanguage && savedLanguage !== DEFAULT_LANGUAGE) {
59
50
  // User has previously selected a language → Use their choice
60
- /* eslint-disable-next-line no-console */
61
- if (__DEV__) console.log('[LocalizationStore] Using saved language preference:', savedLanguage);
62
51
  languageCode = savedLanguage;
63
52
  } else {
64
53
  // First launch → Detect device locale automatically
65
- /* eslint-disable-next-line no-console */
66
- if (__DEV__) console.log('[LocalizationStore] First launch, detecting device locale...');
67
54
  languageCode = getDeviceLocale();
68
- /* eslint-disable-next-line no-console */
69
- if (__DEV__) console.log('[LocalizationStore] Detected device locale:', languageCode);
70
55
  // Save detected locale for future launches
71
56
  await StorageWrapper.setString(STORAGE_KEYS.LANGUAGE, languageCode);
72
- /* eslint-disable-next-line no-console */
73
- if (__DEV__) console.log('[LocalizationStore] Saved detected locale to storage');
74
57
  }
75
58
 
76
59
  // ✅ DEFENSIVE: Validate language exists, fallback to default
77
- /* eslint-disable-next-line no-console */
78
- if (__DEV__) console.log('[LocalizationStore] Validating language code:', languageCode);
79
60
  const language = getLanguageByCode(languageCode);
80
61
  const finalLanguage = language ? languageCode : DEFAULT_LANGUAGE;
81
62
  const finalLanguageObj = getLanguageByCode(finalLanguage);
82
-
83
- if (!language) {
84
- /* eslint-disable-next-line no-console */
85
- console.warn('[LocalizationStore] ⚠️ Language not found:', languageCode, 'falling back to:', DEFAULT_LANGUAGE);
86
- }
87
63
 
88
- /* eslint-disable-next-line no-console */
89
- if (__DEV__) console.log('[LocalizationStore] Changing i18n language to:', finalLanguage);
90
64
  await i18n.changeLanguage(finalLanguage);
91
65
 
92
- /* eslint-disable-next-line no-console */
93
- if (__DEV__) console.log('[LocalizationStore] Setting store state...');
94
66
  set({
95
67
  currentLanguage: finalLanguage,
96
68
  isRTL: finalLanguageObj?.rtl || false,
97
69
  isInitialized: true, // ✅ Always set true to unblock UI
98
70
  });
99
-
100
- /* eslint-disable-next-line no-console */
101
- if (__DEV__) console.log('[LocalizationStore] ✅ Initialization complete. Language:', finalLanguage, 'RTL:', finalLanguageObj?.rtl || false);
102
71
  } catch (error) {
103
- /* eslint-disable-next-line no-console */
104
- console.error('[LocalizationStore] ❌ FATAL: Initialization failed:', error);
105
- /* eslint-disable-next-line no-console */
106
- if (error instanceof Error) {
107
- /* eslint-disable-next-line no-console */
108
- console.error('[LocalizationStore] Error name:', error.name);
109
- /* eslint-disable-next-line no-console */
110
- console.error('[LocalizationStore] Error message:', error.message);
111
- /* eslint-disable-next-line no-console */
112
- console.error('[LocalizationStore] Error stack:', error.stack);
113
- }
114
72
  // Set to default language even on error to prevent app from breaking
115
73
  try {
116
74
  await i18n.changeLanguage(DEFAULT_LANGUAGE);
@@ -119,11 +77,7 @@ export const useLocalizationStore = create<LocalizationState>((set, get) => ({
119
77
  isRTL: false,
120
78
  isInitialized: true, // Set true even on error to unblock UI
121
79
  });
122
- /* eslint-disable-next-line no-console */
123
- console.warn('[LocalizationStore] ⚠️ Fallback to default language due to error');
124
80
  } catch (fallbackError) {
125
- /* eslint-disable-next-line no-console */
126
- console.error('[LocalizationStore] ❌ CRITICAL: Even fallback failed:', fallbackError);
127
81
  throw fallbackError;
128
82
  }
129
83
  }
@@ -134,42 +88,26 @@ export const useLocalizationStore = create<LocalizationState>((set, get) => ({
134
88
  * Updates i18n, state, and persists to AsyncStorage
135
89
  */
136
90
  setLanguage: async (languageCode: string) => {
137
- /* eslint-disable-next-line no-console */
138
- if (__DEV__) console.log('[LocalizationStore] Changing language to:', languageCode);
139
-
140
91
  try {
141
92
  const language = getLanguageByCode(languageCode);
142
93
 
143
94
  // ✅ DEFENSIVE: Early return if unsupported language
144
95
  if (!language) {
145
- /* eslint-disable-next-line no-console */
146
- console.warn('[LocalizationStore] ⚠️ Unsupported language code:', languageCode);
147
96
  return;
148
97
  }
149
98
 
150
- /* eslint-disable-next-line no-console */
151
- if (__DEV__) console.log('[LocalizationStore] Updating i18n language...');
152
99
  // Update i18n
153
100
  await i18n.changeLanguage(languageCode);
154
101
 
155
- /* eslint-disable-next-line no-console */
156
- if (__DEV__) console.log('[LocalizationStore] Updating store state...');
157
102
  // Update state
158
103
  set({
159
104
  currentLanguage: languageCode,
160
105
  isRTL: language.rtl || false,
161
106
  });
162
107
 
163
- /* eslint-disable-next-line no-console */
164
- if (__DEV__) console.log('[LocalizationStore] Persisting language preference...');
165
108
  // Persist language preference
166
109
  await StorageWrapper.setString(STORAGE_KEYS.LANGUAGE, languageCode);
167
-
168
- /* eslint-disable-next-line no-console */
169
- if (__DEV__) console.log('[LocalizationStore] ✅ Language changed successfully to:', languageCode);
170
110
  } catch (error) {
171
- /* eslint-disable-next-line no-console */
172
- console.error('[LocalizationStore] ❌ Error changing language:', error);
173
111
  throw error;
174
112
  }
175
113
  },
@@ -1,17 +0,0 @@
1
- /**
2
- * Localization Repository Interface
3
- * Defines language configuration and types
4
- */
5
- export interface Language {
6
- code: string;
7
- name: string;
8
- nativeName: string;
9
- flag: string;
10
- rtl?: boolean;
11
- }
12
- export interface ILocalizationRepository {
13
- getSupportedLanguages(): Language[];
14
- getLanguageByCode(code: string): Language | undefined;
15
- isLanguageSupported(code: string): boolean;
16
- }
17
- //# sourceMappingURL=ILocalizationRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ILocalizationRepository.d.ts","sourceRoot":"","sources":["../../../src/domain/repositories/ILocalizationRepository.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,qBAAqB,IAAI,QAAQ,EAAE,CAAC;IACpC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtD,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5C"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Localization Repository Interface
3
- * Defines language configuration and types
4
- */
5
- export {};
6
- //# sourceMappingURL=ILocalizationRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ILocalizationRepository.js","sourceRoot":"","sources":["../../../src/domain/repositories/ILocalizationRepository.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
package/lib/index.d.ts DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * React Native Localization
3
- * Universal localization system with i18n support for React Native apps
4
- */
5
- export { useLocalization, useLocalizationStore } from './infrastructure/storage/LocalizationStore';
6
- export { LocalizationProvider } from './infrastructure/components/LocalizationProvider';
7
- export { LanguageSwitcher } from './infrastructure/components/LanguageSwitcher';
8
- export { useLanguageNavigation } from './infrastructure/components/useLanguageNavigation';
9
- export { default as i18n } from './infrastructure/config/i18n';
10
- export { SUPPORTED_LANGUAGES, LANGUAGES, // Alias for SUPPORTED_LANGUAGES (backward compatibility)
11
- DEFAULT_LANGUAGE, getLanguageByCode, isLanguageSupported, getDefaultLanguage, getDeviceLocale, searchLanguages, } from './infrastructure/config/languages';
12
- export type { Language, ILocalizationRepository } from './domain/repositories/ILocalizationRepository';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAG1F,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,SAAS,EAAE,yDAAyD;AACpE,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAG3C,YAAY,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC"}
package/lib/index.js DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * React Native Localization
3
- * Universal localization system with i18n support for React Native apps
4
- */
5
- // Hooks
6
- export { useLocalization, useLocalizationStore } from './infrastructure/storage/LocalizationStore';
7
- // Components
8
- export { LocalizationProvider } from './infrastructure/components/LocalizationProvider';
9
- export { LanguageSwitcher } from './infrastructure/components/LanguageSwitcher';
10
- export { useLanguageNavigation } from './infrastructure/components/useLanguageNavigation';
11
- // Configuration
12
- export { default as i18n } from './infrastructure/config/i18n';
13
- export { SUPPORTED_LANGUAGES, LANGUAGES, // Alias for SUPPORTED_LANGUAGES (backward compatibility)
14
- DEFAULT_LANGUAGE, getLanguageByCode, isLanguageSupported, getDefaultLanguage, getDeviceLocale, searchLanguages, } from './infrastructure/config/languages';
15
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,QAAQ;AACR,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEnG,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAE1F,gBAAgB;AAChB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,SAAS,EAAE,yDAAyD;AACpE,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,mCAAmC,CAAC"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface LanguageSwitcherProps {
3
- showName?: boolean;
4
- showFlag?: boolean;
5
- color?: string;
6
- navigationScreen?: string;
7
- style?: any;
8
- textStyle?: any;
9
- }
10
- export declare const LanguageSwitcher: React.FC<LanguageSwitcherProps>;
11
- export default LanguageSwitcher;
12
- //# sourceMappingURL=LanguageSwitcher.d.ts.map