{"_id":"@boutdecode/i18n","_rev":"6-79a0b3bf77c4379a018bf5dc0e16b828","name":"@boutdecode/i18n","dist-tags":{"latest":"2.0.1"},"versions":{"1.1.0":{"name":"@boutdecode/i18n","version":"1.1.0","description":"I18N lib by boutdecode","main":"index.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix yion index.js","cs":"eslint yion index.js"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"gitHead":"ff3aa5f4fc1a896a79e128250e4757d8393c7fff","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_id":"@boutdecode/i18n@1.1.0","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-5kd5pVlOnwPVxWSkQJke27XJgXY5I2MsRzqg2mFt/HVDz3dUW1qPrZFuSjdKE5np3JEeJbp8/1zSpv4cIQQahQ==","shasum":"f7b7cc03f305db52996568f0400fc173f7439246","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-1.1.0.tgz","fileCount":11,"unpackedSize":4502,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCp0X+9J6vunuxsGwfOrT3k29FhEJcxbp5QcS0Es8fLHwIgdAESRciV2aWVx4dV6VQP4fGfi4l4I0fjjh8fB/0sYYE="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_1.1.0_1689020764408_0.947559258791941"},"_hasShrinkwrap":false},"1.1.1":{"name":"@boutdecode/i18n","version":"1.1.1","description":"I18N lib by boutdecode","main":"index.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix yion index.js","cs":"eslint yion index.js"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"gitHead":"bbe0a6af2348e08fa198c3e2f962af3d5d9a49b4","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_id":"@boutdecode/i18n@1.1.1","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-7gT2NVmojYzg5akFJ/kytZ1DPr+ENF4J4Zs6zyz5JeeM6NrGdSaR1VX2p1F6kbQZI1F38sR02f00ntb7nbos7w==","shasum":"522251a30c11e9994dd65e1f50720ffd1b0039dd","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-1.1.1.tgz","fileCount":11,"unpackedSize":4502,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHecaxG/wcmmuzWhx7U0ez0jtkCFZh02ceBaQWGgsHuAiBYuBL6EU6smwJfy99IuVdjcS9SO93FdlaQD86eOiBr0Q=="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_1.1.1_1689020902446_0.7679192988874708"},"_hasShrinkwrap":false},"1.2.0":{"name":"@boutdecode/i18n","version":"1.2.0","description":"I18N lib by boutdecode","main":"index.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix yion index.js","cs":"eslint yion index.js"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"gitHead":"561b9534809f210fa949f91175f54c212dd38441","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_id":"@boutdecode/i18n@1.2.0","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-2MFCRHaoFT2HzrlH28RHmotwEZtHBj6rIhuO+T9PHPhxc1D5b6vUb7b5TaCMygQpVampCdcIpl1hFsHLfsGUGw==","shasum":"4a2ef6606dbca37833812b90d5b403fb87187473","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-1.2.0.tgz","fileCount":11,"unpackedSize":5246,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOIfchCCI9oCzptMJoLzNbJpmAYmEec1yV7BfmrvzWuAIhAIxAUNRHclPTrcY6okrIujPCtIubqIsou8gP2Jm0r2uH"}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_1.2.0_1689023125659_0.9325084445590888"},"_hasShrinkwrap":false},"1.3.0":{"name":"@boutdecode/i18n","version":"1.3.0","description":"I18N lib by boutdecode","main":"index.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix yion index.js","cs":"eslint yion index.js"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"gitHead":"fa6a46a3b08c1b976219d1147dc9d00e4b7a481a","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_id":"@boutdecode/i18n@1.3.0","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-NnLOGQEid4TpYFHPXbt3iQ/vHRlK3WPUnPgagjG9THht31nZSbEE9M3OlRT4xpDtDgYZ3rhStwYl68mqaJmc3Q==","shasum":"14b80d9c531c8a40dafb067630fe884fdf5ce434","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-1.3.0.tgz","fileCount":11,"unpackedSize":5289,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIATojikugzWWDrbzt6vyImrV2qkLMxCFoUaK3D3Fh5IGAiB0h87HGci8SRKHeVmBUzWFC1yFLomauD4B4MnCWCEUIA=="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_1.3.0_1695026279481_0.2584714578743579"},"_hasShrinkwrap":false},"1.0.0":{"name":"@boutdecode/i18n","version":"1.0.0","description":"I18N lib by boutdecode for Yion","main":"plugin/i18n.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix plugin","cs":"eslint plugin"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"_id":"@boutdecode/i18n@1.0.0","gitHead":"50e623a85d12a7a47c414418c8e3383a3573ef0f","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-GRwfm5oxzhw3TJWFwQS81bc1Dti8r9y/Wlm23OJhOnDmp2mvXypFTbgvpLhog+OSz5KAC1HZJJhLe8h7jPNcOw==","shasum":"a4358179f8d7187de444079c50265fb7f2177214","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-1.0.0.tgz","fileCount":8,"unpackedSize":6161,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3k7U6l3JLQCkHjS4bOrGWt80WkqZY8IbyxfEpcII5JgIgE8pOeaqPaxEG4Jd8KNgDTyUxmkWjrB5ZqI7EsSma7Wg="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_1.0.0_1709239458570_0.6121414244115997"},"_hasShrinkwrap":false},"2.0.0":{"name":"@boutdecode/i18n","version":"2.0.0","description":"I18N lib by boutdecode for Yion","main":"plugin/i18n.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix plugin","cs":"eslint plugin"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"_id":"@boutdecode/i18n@2.0.0","gitHead":"8d900331738368d755a3c339305f431a224a79d6","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-7Fi5ry3MAUSIIUQeB5BDJ1xbhzPyUsvUCJ+IJzlqmGX1j/+O54KibQEyK3kTmb+2QvHEgmaUJ0y05CB3sUIGsA==","shasum":"e7a3623d4d601dda0c5a160582ce957671296bc6","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-2.0.0.tgz","fileCount":8,"unpackedSize":6371,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIESunL1I3IE/hLkdURXp9fUZaVdDCMBflRV8CxEu9YenAiEAgqnDvPz2IKF9P2n9WUnD2oxwmyOZsABdUcgniQFSPWw="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_2.0.0_1709239646172_0.6084650116308812"},"_hasShrinkwrap":false},"2.0.1":{"name":"@boutdecode/i18n","version":"2.0.1","description":"I18N lib by boutdecode for Yion","main":"plugin/i18n.js","scripts":{"test":"npm run cs","fix-cs":"eslint --fix plugin","cs":"eslint plugin"},"repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"license":"MIT","devDependencies":{"eslint":"^8.44.0","eslint-config-standard":"^17.1.0"},"dependencies":{"accept-language-parser":"^1.5.0","i18next":"^23.2.8"},"_id":"@boutdecode/i18n@2.0.1","gitHead":"9985d70151942432f60f1f92036085e9e776c619","bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"homepage":"https://github.com/boutdecode/i18n#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-g06Njpv4nPStre8lhan8GbHiE0PUZZPhXBWk/Ui00Su81KYLXyZjQ4ehz1L0AfpQOWlSZlIT7D+a89JBk+SzOg==","shasum":"aa3fbacb9f2a6b1bab4bf5b38d199611cd23ac2d","tarball":"https://registry.npmjs.org/@boutdecode/i18n/-/i18n-2.0.1.tgz","fileCount":8,"unpackedSize":6591,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyCHDwLSpbPivjVpPYiAwLD2eBENm/eTspk79qy9CVMAiEAojXgrKpQZt7thBAK0slLhs9pXzx6G+J8V+WmwQuqhrE="}]},"_npmUser":{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"},"directories":{},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18n_2.0.1_1709240097926_0.6637629505736564"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-10T20:26:04.348Z","1.1.0":"2023-07-10T20:26:04.588Z","modified":"2024-02-29T20:54:58.769Z","1.1.1":"2023-07-10T20:28:22.612Z","1.2.0":"2023-07-10T21:05:25.887Z","1.3.0":"2023-09-18T08:37:59.725Z","1.0.0":"2024-02-29T20:44:18.715Z","2.0.0":"2024-02-29T20:47:26.337Z","2.0.1":"2024-02-29T20:54:58.126Z"},"maintainers":[{"name":"kevinbalicot","email":"kevinbalicot@gmail.com"}],"description":"I18N lib by boutdecode for Yion","homepage":"https://github.com/boutdecode/i18n#readme","repository":{"type":"git","url":"git+https://github.com/boutdecode/i18n.git"},"author":{"name":"Kevin Balicot","email":"kevinbalicot@gmail.com"},"bugs":{"url":"https://github.com/boutdecode/i18n/issues"},"license":"MIT","readme":"# I18N tools by Bout de code\n\n![https://boutdecode.fr](https://boutdecode.fr/img/logo.png)\n\n[Bout de code](https://boutdecode.fr) - Développement de site internet et blog avec de vrais morceaux de codes, simples, élégants, utiles (parfois) et surtout sans fioriture.\n\n## Installation\n\n```shell\n$ npm install @boutdecode/i18n\n```\n\n## Yion plugin\n\nFor yion : \n\nBefore create translation files like :\n\n`whatever.<lang>.json|js`\n\nExample :\n\n```\n/translations\n  messages.en.json\n  messages.fr.json\n```\n\nFinally\n\n```javascript\nconst { createApp, createServer } = require('@boutdecode/yion')\nconst i18nPlugin = require('@boutdecode/i18n')\n\nconst app = createApp()\nconst server = createServer(app)\n\napp.use(i18nPlugin({\n  locale: 'en', // Default locale\n  folder: 'translations' // Folder where translation files are located\n}))\n\napp.get('/', ({ i18n }) => {\n  i18n.locale // Current locale, null if not detected\n  i18n.t('hello') // translate hello\n})\n\nserver.listen(8080)\n```\n\n## Tests\n\n```shell\n$ npm run test\n```\n","readmeFilename":"README.md"}