{"_id":"swift-i18n","_rev":"32-b5e4b7b003a007aa6e5eb5629faa8c39","name":"swift-i18n","dist-tags":{"latest":"1.3.0"},"versions":{"1.1.0":{"name":"swift-i18n","version":"1.1.0","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.1.0","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"5d6908901e928f9e498d736ffac864b125effc4a","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.1.0.tgz","fileCount":69,"integrity":"sha512-BNP9Ik0f/aX/56aK3ra/b737N6eMF0RGS/xIkdqMbKOfCTklrnGERN/FU5lLMn8aBpEAXowMYNlZHHIAX1PZlA==","signatures":[{"sig":"MEYCIQCgx6KDXv6dsEfYd3uwh6M9DurP6UoX7mvOVtNL0xXbbgIhAJr73/3ZUOAAgyImL3v5oO+wGMjAKRHUp+StRLR3K+qT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61929},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"4bb476dd869cae4b9cf73f0330fde078de7e570e","scripts":{"build":"tsc"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.5.2","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","typescript":"^5.9.2","@types/node":"^24.2.1"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.1.0_1755417651778_0.16834582820338517","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"swift-i18n","version":"1.1.1","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.1.1","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"1784b711020f1c25aeb4cef57375005c70e6763a","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.1.1.tgz","fileCount":69,"integrity":"sha512-me82jIuO101KCikhhBaEkc2HqqI8amCbNLLQDER0l4T2rrpLPP9W7RMO0GslWd6DVBvTlkQ9sk33CCvYJFBCJA==","signatures":[{"sig":"MEUCIFE/KDTMsQ5vS1BkST8ZPu0kNUs9E/E0dNcEXV7s/skMAiEA1DP8vN19VX8S9TmiLlgYXQAYpQoG+JmUSn91qKh2kuw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62083},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"77a24eacf40b3bc60bf39808f7a7e4781fca8a8f","scripts":{"build":"tsc"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.5.2","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","typescript":"^5.9.2","@types/node":"^24.2.1"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.1.1_1755417960443_0.20445642008815335","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"swift-i18n","version":"1.2.0","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.0","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"0f0cefbca09e3f613bc041ac407e29c3cd38bbe8","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.0.tgz","fileCount":94,"integrity":"sha512-06/HCIoJ1YgXiivDeTdViKFs5RleAWTiq7E4FT8rTlBAJIqCCus2ovrZc00eGoVie4C7qi0tM/OnEUB215+wKw==","signatures":[{"sig":"MEYCIQCbS2oCsaa6WnJwtxSFi0h4opK/gzmhTlDnxCxeSsM3ZQIhAObHuhIH+4GEI3ztyHcpLbWDjd0D2mSLZGYhELNYua7F","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140519},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"77a24eacf40b3bc60bf39808f7a7e4781fca8a8f","scripts":{"test":"vitest","build":"tsc","build:watch":"tsc --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.0_1755767213053_0.33691854904770646","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"swift-i18n","version":"1.2.1","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.1","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"4380df22f92247dea43c88465b73ab14d726d6fe","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.1.tgz","fileCount":94,"integrity":"sha512-L3ekUB2mBCO6IIIZB/EFQcRFdQOOW2HFCWtZZY/X5H3G76S8XylpwWaIIWkN83KmVMXCkLLf05PiTnQnwpmkug==","signatures":[{"sig":"MEUCIQDU6lVN0MI1xuMuVIGzR7AghGzc7UHm582cXPy1x81MNAIgMJs2gyJW/RXQlH7kkeqYEKgBtzZBbnrSD1JMGonWaHI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141929},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"6a61800a9dcf92b6dd641b9997d39340914c700b","scripts":{"test":"vitest","build":"tsc","build:watch":"tsc --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.1_1755792373263_0.7525725151525395","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"swift-i18n","version":"1.2.2","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.2","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"801854e9594de83f4412eb7e4420a58e3ef48c55","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.2.tgz","fileCount":98,"integrity":"sha512-xuNG/wdUtodDmJWlFBrHrGNAnsIJjV65NbUB7j2KozujTskg4rPLl2fjpb4//VZbWVQ3+1U7q25p0iEZaqxvqg==","signatures":[{"sig":"MEUCID/d5ZOefnUX2EC4tJX3Dj8aw3SNhonZ8+pz60+ackOzAiEA3BihjCz89lk3VrKc2/bZlAlBBOdWgXS5KG5OXce/EyE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":147172},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"df79806948949a5361e37992d2e427147586c30e","scripts":{"test":"vitest","build":"tsc","build:watch":"tsc --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.2_1755853346605_0.5372332616491187","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"swift-i18n","version":"1.2.3","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.3","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"f9047d319001d8bc3be5a5eba257acb04a98bf05","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.3.tgz","fileCount":98,"integrity":"sha512-piXZMKqS+jHtSH0bHVHnuQnWDvCKi+jDbLXDr4eeRMDKJg0SVwgJGLdrAH6PLYtlAUWjujyHiuCPcD0LYelRoA==","signatures":[{"sig":"MEYCIQCjvQuGMYyXd7Z3PioomUZK3o3F3d4/mPhTWUMfNy19FwIhAJ35bCyZmxg3jsEbuKKyclN0tDC3YpUahNJB3S/Zathm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149909},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"4aafd99786c3c46f6a9e8fb25d25bce05895f2a9","scripts":{"test":"vitest","build":"tsc","build:watch":"tsc --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.3_1755932100219_0.6370134336587263","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"swift-i18n","version":"1.2.4","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.4","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://github.com/RondaYummy/swift-i18n","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"df316a27dcc817a824b9af0adc90628c1d5f08dc","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.4.tgz","fileCount":106,"integrity":"sha512-m6U7rB9v55qPrVonnZjFpKN+u7IDzAqNopUEuZkRW97w2BX5SnS6AiBjr0s1skiyvDyoQLdLHg2ltE0IW84b1g==","signatures":[{"sig":"MEYCIQCALKGEeYdDcML6x77e56ifI1+07iTL9Lt9awiQBTE18wIhANGXHlpQhmtsWKOWfmGPWLvt1tLLlWooFYztfAWneb+6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159717},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"272ce7a6e45817efed7e97780534ea4ca247e8ed","scripts":{"test":"vitest","build":"tsc","build:watch":"tsc --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.18","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.4_1755944091969_0.013471419716388544","host":"s3://npm-registry-packages-npm-production"}},"1.2.5":{"name":"swift-i18n","version":"1.2.5","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","_id":"swift-i18n@1.2.5","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"homepage":"https://rondayummy.github.io/swift-i18n/","bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"dist":{"shasum":"86ab07a0cb84dbcef633c7858403c09ebdd56dff","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.2.5.tgz","fileCount":122,"integrity":"sha512-4UZObqCxJZof/g4gpJd7CH8OBR8BKIYFMavzmaIVYizWC8hsflswNp9ILM1eVYb7QmO35f8Xed3tqpoy76m/rg==","signatures":[{"sig":"MEYCIQDm6bSQxZoAFlYndIv2zhWRgNZ6a2/2N1a/xkafOXNf4AIhAIwbybmWoZFLCgqj2F91ThbkABgeqfKM/Ud69leYSj2L","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":248328},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"gitHead":"55ccccfad27aeefc2a6a77d711677266e8d2e6bb","scripts":{"test":"vitest","build":"tsc","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","build:watch":"tsc --watch","docs:preview":"vitepress preview docs","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"repository":{"url":"git+https://github.com/RondaYummy/swift-i18n.git","type":"git"},"_npmVersion":"11.4.1","description":"Fast & Lightweight swift-i18n Library","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.19","vite":"^7.1.1","jsdom":"^26.1.0","react":"^19.1.1","vitest":"^3.2.4","vitepress":"^2.0.0-alpha.12","typescript":"^5.9.2","@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4"},"peerDependencies":{"events":"^3.3.0"},"_npmOperationalInternal":{"tmp":"tmp/swift-i18n_1.2.5_1755977373417_0.0839224604847788","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"swift-i18n","version":"1.3.0","description":"Fast & Lightweight swift-i18n Library","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","scripts":{"build":"tsc","build:watch":"tsc --watch","test":"vitest","test:coverage":"vitest run --coverage","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"homepage":"https://rondayummy.github.io/swift-i18n/","repository":{"type":"git","url":"git+https://github.com/RondaYummy/swift-i18n.git"},"bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"devDependencies":{"@types/node":"^24.2.1","@types/react":"^19.1.10","@vitest/coverage-v8":"^3.2.4","jsdom":"^26.1.0","react":"^19.1.1","typescript":"^5.9.2","vite":"^7.1.1","vitepress":"^2.0.0-alpha.12","vitest":"^3.2.4","vue":"^3.5.19"},"peerDependencies":{"events":"^3.3.0"},"exports":{".":"./dist/index.js","./vue-plugin":"./dist/plugins/vue-plugin.js","./react-plugin":"./dist/plugins/react-plugin.js"},"_id":"swift-i18n@1.3.0","gitHead":"1d9efc07a13eeebf1178ae2ea04496a68d30f9ec","_nodeVersion":"22.14.0","_npmVersion":"11.4.1","dist":{"integrity":"sha512-vVXDdJxaDmM7uJAxI5xSzjNwB4lT0zrdJ0JrI68+Jbe09sdEGXl6t9eVFnFsArszLYsINBfy4ZVKJi/MMzlTlA==","shasum":"612377bb26ad4285b959c7cc69b5ba136efc0123","tarball":"https://registry.npmjs.org/swift-i18n/-/swift-i18n-1.3.0.tgz","fileCount":123,"unpackedSize":256548,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCBuRgsKNNgEwcBdn3+mq/6RV/1UAh1MudbnSYywYALsAIgC6wvC9PSOMEeiN0yRCd1/Walm1DiLsksucX85poyG9k="}]},"_npmUser":{"name":"rondo_yummy","email":"halevych.dev@gmail.com"},"directories":{},"maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/swift-i18n_1.3.0_1756023194712_0.9688350930587821"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-17T08:00:51.646Z","modified":"2025-08-24T08:13:15.140Z","1.0.0":"2025-08-10T07:13:47.651Z","1.0.1":"2025-08-10T09:05:11.050Z","1.0.2":"2025-08-10T09:10:25.273Z","1.0.3":"2025-08-10T09:12:52.275Z","1.0.4":"2025-08-10T09:27:10.115Z","1.0.5":"2025-08-10T09:33:31.000Z","1.0.6":"2025-08-10T09:40:32.896Z","1.0.7":"2025-08-10T09:55:56.436Z","1.0.8":"2025-08-10T09:58:43.878Z","1.0.9":"2025-08-10T10:03:34.919Z","1.0.10":"2025-08-10T10:08:48.021Z","1.0.11":"2025-08-10T10:10:48.302Z","1.0.12":"2025-08-10T10:26:19.576Z","1.0.13":"2025-08-10T10:29:46.702Z","1.0.15":"2025-08-10T10:44:12.031Z","1.0.16":"2025-08-10T10:53:30.606Z","1.0.17":"2025-08-10T10:56:38.733Z","1.0.18":"2025-08-10T11:07:33.774Z","1.0.19":"2025-08-10T11:10:01.137Z","1.1.0":"2025-08-17T08:00:51.940Z","1.1.1":"2025-08-17T08:06:00.622Z","1.2.0":"2025-08-21T09:06:53.219Z","1.2.1":"2025-08-21T16:06:13.492Z","1.2.2":"2025-08-22T09:02:26.793Z","1.2.3":"2025-08-23T06:55:00.408Z","1.2.4":"2025-08-23T10:14:52.177Z","1.2.5":"2025-08-23T19:29:33.632Z","1.3.0":"2025-08-24T08:13:14.931Z"},"bugs":{"url":"https://github.com/RondaYummy/swift-i18n/issues"},"author":{"name":"RondoYummy","email":"halevych.dev@gmail.com"},"license":"MIT","homepage":"https://rondayummy.github.io/swift-i18n/","keywords":["i18n","vue3","vue","internationalization","react","reactive","typescript","intl","translation","localization"],"repository":{"type":"git","url":"git+https://github.com/RondaYummy/swift-i18n.git"},"description":"Fast & Lightweight swift-i18n Library","maintainers":[{"name":"rondo_yummy","email":"halevych.dev@gmail.com"}],"readme":"# swift-i18n\n\nBlazing-fast, dependency-free i18n library for `Vue 3`, `React` and modern `JS/TS apps`.\nUses native `Intl APIs` and modern features for blazing performance, dynamic locale loading, and `type-safe` keys.\n\n[![Coverage Status](https://coveralls.io/repos/github/RondaYummy/swift-i18n/badge.svg?branch=main)](https://coveralls.io/github/RondaYummy/swift-i18n?branch=main)\n[![npm version](https://badge.fury.io/js/swift-i18n.svg)](https://badge.fury.io/js/swift-i18n)\n![NPM Downloads](https://img.shields.io/npm/dm/swift-i18n)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/RondaYummy/swift-i18n)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FRondaYummy%2Fswift-i18n.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2FRondaYummy%2Fswift-i18n?ref=badge_shield&issueType=license)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FRondaYummy%2Fswift-i18n.svg?type=shield&issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2FRondaYummy%2Fswift-i18n?ref=badge_shield&issueType=security)\n\n---\n\n## Why choose swift-i18n?\n- **Higher speed** — no unnecessary dependencies, works on pure `Intl API`.\n- **Minimal size** — lightweight and compact code.\n- **TypeScript support** — `type-safe` translation keys and autocomplete.\n- **Dynamic loading and caching** — convenient for working with large projects.\n- **Easy integration** — `React` plugin and `Vue 3` plugin with provide/inject and hooks\n- **Full support** — For `plural` and `formatting` — `numbers`, `dates`, `currencies`, `units`.\n\n---\n\n## Features\n\n- Native Intl APIs: `Intl.NumberFormat`, `Intl.DateTimeFormat`, `Intl.PluralRules`, `Intl.RelativeTimeFormat`\n- Language detection (`localStorage`, `cookie`, `browser language`)\n- Dynamic locale loading via `ESM` dynamic import\n- Vue 3 plugin with `provide`/`inject` and global `$t` function\n- TypeScript-friendly with `type-safe` translation keys and autocompletion\n\n---\n\n## Get Started\n\n#### 1. Installation\n\n```bash\nnpm install swift-i18n\n```\n\n#### 2. Create locale files\nCreate a `locales` folder in your `src` directory:\n\n```bash\nsrc/\n ├─ locales/\n │   ├─ en.json\n │   └─ uk.json\n```\n\n#### Example `en.json`:\n\n```json\n{\n  \"common\": {\n    \"hello\": \"Hello!\",\n    \"items_one\": \"{count} item\",\n    \"items_other\": \"{count} items\"\n  },\n  \"home\": {\n    \"title\": \"Welcome\",\n    \"description\": \"This is the home page\"\n  }\n}\n```\n\n## `Vue 3` Integration with `Vite`\n\n```ts\nimport { createApp } from 'vue';\nimport App from './App.vue';\nimport { createSwiftI18n } from 'swift-i18n/vue-plugin';\n\nconst app = createApp(App);\n\nconst i18n = await createSwiftI18n({\n  defaultLang: 'en',\n  supportedLangs: ['en', 'uk'],\n  loader: async (lang) => {\n    const module = await import(`./locales/${lang}.json`)\n    return module.default\n  }\n});\napp.use(i18n);\n\napp.mount('#app');\n```\n\n## Usage in components (`<script setup>`)\n\n```vue\n<script setup lang=\"ts\">\nimport { useI18n } from 'swift-i18n/vue-plugin';\n\nconst { t, plural, changeLanguage, lang } = useI18n();\n</script>\n\n<template>\n  <h1>Current language: {{ lang }}</h1>\n\n  <div>{{ t('common.hello') }}</div>\n  <div>{{ plural('common.items', 5) }}</div>\n\n  <button @click=\"changeLanguage('uk')\">UK</button>\n  <button @click=\"changeLanguage('en')\">EN</button>\n</template>\n```\n\n---\n\n## `React` Integration\n\n```tsx\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from './App.tsx';\nimport { createSwiftI18n } from 'swift-i18n/react-plugin';\n\nasync function bootstrap() {\n  const I18nProvider = await createSwiftI18n({\n    defaultLang: 'en',\n    supportedLangs: ['en', 'uk'],\n    loader: async (lang) => {\n      const module = await import(`./locales/${lang}.json`)\n      return module.default\n    }\n  });\n\n  createRoot(document.getElementById('root')!).render(\n    <React.StrictMode>\n      <I18nProvider>\n        <App />\n      </I18nProvider>\n    </React.StrictMode>\n  )\n}\n\nbootstrap()\n```\n\n```tsx\nimport React from 'react';\nimport { useI18n } from 'swift-i18n/react-plugin';\n\nexport default function App() {\n  const { t, lang, changeLanguage, plural } = useI18n();\n\n  return (\n    <>\n      <div>{t('common.hello')}</div>\n      <div>{plural('common.items', 3)}</div>\n      <button onClick={() => changeLanguage('uk')}>🇺🇦</button>\n      <button onClick={() => changeLanguage('en')}>🇬🇧</button>\n      <p>Current lang: {lang}</p>\n    </>\n  );\n}\n```\n\n---\n\n## Format helpers\n\n```ts\nimport { formatCurrency, formatDate, formatRelativeTime, formatNumber, formatUnit } from 'swift-i18n';\n\nformatNumber(1234567.89, 'en-US'); // \"1,234,567.89\"\nformatCurrency(1234.5, 'USD', 'en-US'); // \"$1,234.50\"\nformatUnit(10, 'kilometer-per-hour', 'en-US'); // \"10 km/h\"\nformatDate(new Date(), 'en-US'); // \"8/11/2025\"\nformatRelativeTime(-2, 'day', 'en-US'); // \"2 days ago\"\n```\n\n---\n\n## Core Features\n\n### Pluralization\n\nThe `plural(baseKey: string, count: number, vars?: Record<string, any>)` method returns the correct plural form translation:\n\n#### Example `JSON` structure:\n\n```json\n{\n  \"common\": {\n    \"items_one\": \"{count} item\",\n    \"items_few\": \"{count} items\",\n    \"items_many\": \"{count} items\",\n    \"items_other\": \"{count} items\"\n  }\n}\n```\n\n#### Usage:\n\n```js\nplural('common.items', 1); // \"1 item\"\nplural('common.items', 3); // \"3 items\"\n```\n\n---\n\n### Variable Interpolation\n\nPass variables into translations via the vars object:\n\n```json\n{\n  \"greeting\": \"Hello, {name}!\"\n}\n```\n\n```ts\nt('greeting', { name: 'Alice' }); // \"Hello, Alice!\"\nplural('common.items', 5, { name: 'Alice' });\n```\n\n---\n\n### Fallbacking\n\n`fallbackLang: 'en'` to choose which language to use when your preferred language lacks a translation.\n\nSometimes some items will not be translated into some languages. In this example, the item `hello` is available in English but not Japanese:\n\n```json\n{\n  \"en\": {\n    \"hello\": \"Hello, world!\"\n  },\n  \"ja\": {\n  }\n}\n```\n\nIf you want to use (say) `en` items when an item is not available in your desired locale, set the `fallbackLang` option in the `createSwiftI18n`:\n\n```ts\nconst i18n = await createSwiftI18n({\n  defaultLang: 'ja',\n  fallbackLang: 'en',\n  loader: async (lang) => {\n    const module = await import(`./locales/${lang}.json`)\n    return module.default\n  }\n});\n```\n\n---\n\n# Advanced Usage\n\n## Linked messages\n\nIf there’s a locale messages key that will always have the same concrete text as another one you can just link to it.\n\nTo link to another locale messages key, all you have to do is to prefix its contents with an `@:key` sign followed by the full name of the locale messages key including the namespace you want to link to.\n\n#### Locale messages the below:\n\n```json\n{\n  \"en\": {\n    \"message\": {\n      \"the_world\": \"the world\",\n      \"dio\": \"DIO:\",\n      \"linked\": \"@:message.dio @:message.the_world !!!!\"\n    }\n  }\n}\n```\nIt’s `en` locale that has hierarchical structure in the object.\n\nThe `message.the_world` has `the_world` and `message.dio`. The `message.linked` has `@:message.dio @:message.dio @:message.the_world !!!!`, and it’s linked to the locale messages key with `message.dio` and `message.the_world`.\n\n#### The following is an example of the use of `$t()` or `t()` in a template:\n\n```html\n<p>{{ $t('message.linked') }}</p>\n```\n\nThe first argument is `message.linked` as the locale messages key as a parameter to `t`.\n\n#### As result the below:\n\n```html\n<p>DIO: the world !!!!</p>\n```\n\n---\n\n## Using the escape parameter option\n\nTo help mitigate XSS risks when using HTML messages, Vue I18n provides escape parameter options. When enabled, this option escapes interpolation parameters and sanitizes the final translated HTML.\n\n#### For example:\n\n```ts\n// enable `escapeParameter` globally\nconst i18n = createI18n({\n  locale: 'en',\n  escapeParameter: true,\n})\n\n// or enable it per translation\nt('message.welcome', { name }, { escapeParameter: true })\n```\n\n#### How it works\n\nWhen the escape parameter option is enabled:\n\n- HTML special characters (`<`, `>`, `\"`, `'`, `&`, `/`, `=`) in interpolation parameters are escaped\n- The final translated HTML is sanitized to prevent XSS attacks:\n  - Dangerous characters in HTML attribute values are escaped\n  - Event handler attributes (`onclick`, `onerror`, etc.) are neutralized\n  - JavaScript URLs in href, src, action, formaction, and style attributes are disabled\n\n#### Example\n\n```ts\nconst input = '<img src=x onerror=alert(1)>'\n\n// Without escape parameter (DANGEROUS):\n$t('message.hello', { name: input })\n// Result: Hello <strong><img src=x onerror=alert(1)></strong>!\n\n// With escape parameter (SAFE):\n$t('message.hello', { name: input }, { escapeParameter: true })\n// Result: Hello <strong>&lt;img src=x &#111;nerror=alert(1)&gt;</strong>!\n```\n\n---\n\n## Dynamic loading & caching\n\n- Translations are dynamically loaded via ESM `import()`\n- Automatic loading when calling `changeLanguage()`.\n\n---\n\n## `Type-safe` Translations\n\nAdd type definitions for autocompletion:\n\n1. Create `src/types/swift-i18n.d.ts`:\n\n**[Manual schema definition]**\n\n```ts\nimport 'swift-i18n';\ndeclare module 'swift-i18n' {\n  // Merge interface — put YOUR key scheme here\n  interface Translations {\n    common: {\n      hello: string;\n      items_one: string;\n      items_other: string;\n    };\n    home: {\n      title: string;\n      description: string;\n    };\n  }\n}\n```\n\n**[Derive schema directly from a JSON locale file]**\n\nAlternatively, you can generate the type definition automatically from an existing locale (e.g. `en.json`).\nThis approach ensures the types always stay in sync with your translation files.\n\n```ts\nimport 'swift-i18n';\nimport en from '../locales/en.json'\n\ntype MessageSchema = typeof en;\n\ndeclare module 'swift-i18n' {\n  interface Translations extends MessageSchema {};\n}\n```\n\n> [!TIP]\n> Use the **manual schema** if you want strict control.  \n> Use the **derived schema** if you prefer automatic synchronization.\n\n2. Add to `tsconfig.json`:\n\n```json\n{\n  \"include\": [\n    \"src/types/**/*\"\n  ]\n}\n```\n\n---\n\n# Custom Message Format\n\n> [!TIP]\n> Supported Versions 1.3+\n\nIf you want to use a message format like ICU Message Format, you can use a custom format by implementing the message compiler yourself.\n\n> [!WARNING]\n> This topic requires understanding Swift I18n message format compilation and how formats are resolved.\n\n> [!CAUTION]\n> The feature is experimental. It may receive breaking changes or be removed in the future.\n\n## Message Compiler implementation\n\nYou can make a message compiler by implementing functions with the following interfaces.\n\nThe following is a TypeScript type definition:\n\n```js\nexport type MessageCompiler = (\n  message: string | unknown,\n  ctx: {\n    locale: string;\n    key: string;\n    onError?: (err: CompileError) => void;\n  }\n) => MessageFunction;\n```\n\nThe following is an example of a message compiler implementation that uses [`intl-messageformat`](https://formatjs.io/docs/intl-messageformat/) to support the ICU Message format.\n\n```ts\nimport IntlMessageFormat from \"intl-messageformat\";\n\nimport type { MessageCompiler, CompileError, MessageContext } from \"swift-i18n\";\n\nexport const messageCompiler: MessageCompiler = (\n  message,\n  { locale, key, onError }\n) => {\n  if (typeof message === \"string\") {\n    /**\n     * You can tune your message compiler performance more with your cache strategy or also memoization at here\n     */\n    const formatter = new IntlMessageFormat(message, locale);\n    return (ctx: MessageContext) => {\n      return formatter.format(ctx.values);\n    };\n  } else {\n    /**\n     * for AST.\n     * If you would like to support it,\n     /**\n      * You need to transform locale messages such as `json`, `yaml`, etc. with the bundle plugin.\n      */\n    if (onError) {\n      onError(\n        new Error(\"AST format for messages is not supported\") as CompileError\n      );\n    }\n    return () => key;\n  }\n};\n```\n\n## Message compiler registration\n\nAfter implementing message compiler, set the `messageCompiler` option of `createSwiftI18n` as follows, and you can use your message format for the `messages` option:\n\n```ts\nimport { createSwiftI18n } from \"swift-i18n\";\nimport { messageCompiler } from \"./compilation\";\n\nconst i18n = createSwiftI18n({\n  locale: \"en\",\n  messageCompiler,\n});\n\n// the below your something to do ...\n// ...\n```\n\nExample in the translation file:\n\n```json\n{\n  \"common\": {\n    \"hello\": \"Hello {name}, you have {count, plural, one {# message} other {# messages}}\"\n  }\n}\n```\n\nExample of use and substitution in a template:\n\n```html\n<h1>{{ t('common.Hello', { name: \"John\", count: 5 }) }}</h1>\n```\n\nResult obtained:\n\n```js\nHello John, you have 5 messages\n\n```\n\n## Reference\n\n> [!NOTE]\n> You can get the code for the tutorial below on [examples/message-format](https://github.com/intlify/vue-i18n/tree/master/examples/message-format).\n\n---\n\n## Debugging missing translations\n\n### Runtime warnings\n\n`swift-i18n` supports the **runtime key warnings** mechanism, which helps find problems with translation keys during development.\nThis allows you to quickly detect errors in localization keys that `TypeScript` cannot check statically.\n\n\n#### The framework will output `console.warn` if one of the following occurs during the call to `t()`:\n- Key not found in locale\n- The value is not a string\n- If supportedLangs is passed, then when attempting to change the language to one that is not supported\n\nBy default, `warnOnMissing` is enabled. To disable it, pass `warnOnMissing: false` to the `swift-i18n` configuration.\n\n---\n\n## Contribution\nWelcome to contribute to `swift-i18n`!\n\n- Fork the repository.\n- Create a branch with new features or fixes.\n- Write tests for new features.\n- Send a pull request with a detailed description.\n- Sign commits according to Conventional Commits.\n\nContact me if you need help or ideas.\n","readmeFilename":"README.md"}