{"_id":"@18f/identity-i18n","_rev":"26-d75f2ede6f21dacebe15a88b4d0298b0","name":"@18f/identity-i18n","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1-beta0.1":{"name":"@18f/identity-i18n","version":"0.0.1-beta0.1","license":"CC0-1.0","_id":"@18f/identity-i18n@0.0.1-beta0.1","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"394b7644667ca9c98fcdeea3978525cc66dd0a95","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-0.0.1-beta0.1.tgz","fileCount":4,"integrity":"sha512-n9yCPM35GrwxjKVuD76a2K44kiX/IOmrpada8B+jEwBzsvYn6AJzgWZmOVKAuK6kXRAz/Lg31sNbkvhriX8M6g==","signatures":[{"sig":"MEUCIQDZQlgPLbc3QkeKoU9EXMPT2iuPLv+CVfDIaHCpwNC7KgIgcJFpyxjgN+ORpimSz4OfpPOE7KUwgZv6NYbQ+aU3w6E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8807},"type":"module","exports":{".":{"source":"./index.tsx","default":"./dist/index.js"}},"gitHead":"a649803713cd1baa8ff9c241c8210d87ba94ff27","private":false,"scripts":{"prepublishOnly":"webpack"},"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_0.0.1-beta0.1_1694530649737_0.3668234111877333","host":"s3://npm-registry-packages"}},"0.0.1-beta0.2":{"name":"@18f/identity-i18n","version":"0.0.1-beta0.2","license":"CC0-1.0","_id":"@18f/identity-i18n@0.0.1-beta0.2","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"8491db29537578ab9942e2120cbfbb00ed001b90","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-0.0.1-beta0.2.tgz","fileCount":4,"integrity":"sha512-L8JCguUGiafN2bMxzsXz/fp0k8DpShlxnOUryKUxAhsZ0l4cIpVinVkVT78rDzmwXPl+shiE680KX+7vNltnbw==","signatures":[{"sig":"MEUCIEbRvKSXVOMghmSzmGiJZCkbZ+MwSMJgVge63sw/aE4NAiEA9UDTnPn6ImMS3zoSevZ8GHIkY1//9zff4TXcyyyKoT8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8679},"type":"module","exports":"./index.ts","gitHead":"a649803713cd1baa8ff9c241c8210d87ba94ff27","private":false,"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_0.0.1-beta0.2_1694531821676_0.10790787869055785","host":"s3://npm-registry-packages"}},"0.0.1-beta0.3":{"name":"@18f/identity-i18n","version":"0.0.1-beta0.3","license":"CC0-1.0","_id":"@18f/identity-i18n@0.0.1-beta0.3","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"8e49fa5775b6de2008d646d055fa5601a16e15c1","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-0.0.1-beta0.3.tgz","fileCount":4,"integrity":"sha512-TXwTMfbQGlJob/RPG2oKUO+15Au+I1zZM1Jzt8zWAz7ssic43DukcQBR0LJxKp60GKyHcQpY/uOVdNtVNzw7bA==","signatures":[{"sig":"MEUCIQCqC1mWk7+dKL//Zf9Mq1bnXi57eXlWgRqRZ8Z7yfb04gIgM+V3z0JnOEtVqxFWV8um9LyTtGfBZpvVTaKnqjuw7Yw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7582},"type":"module","exports":"./index.ts","gitHead":"a649803713cd1baa8ff9c241c8210d87ba94ff27","private":false,"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_0.0.1-beta0.3_1694531942757_0.7009998572009519","host":"s3://npm-registry-packages"}},"0.0.1-beta0.4":{"name":"@18f/identity-i18n","version":"0.0.1-beta0.4","license":"CC0-1.0","_id":"@18f/identity-i18n@0.0.1-beta0.4","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"280bc0d877c2824d20c45a3e282d42466a7cf5ea","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-0.0.1-beta0.4.tgz","fileCount":4,"integrity":"sha512-5sFK20Ge3gjFaUXVTlxRYrxpvChXlhQ2EFNl4r+w4fyVRPh1egsx1LF8DHyJwjgbpr59EclpHEAjmWgoF1YK8w==","signatures":[{"sig":"MEYCIQD3xSTpAM8DV7KF42L1h2Ev+gEgg6zbv4CNe62a2isz9gIhANUtVkyYvrZQMjeV/Wd604yiHD0mlZLADtVTmSCSQK7P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7454},"type":"module","exports":{".":{"source":"./index.ts","default":"./dist/index.js"}},"gitHead":"cb46b897eba40f5d826f09ae06cc0f864881818f","private":false,"scripts":{"prepublishOnly":"babel index.ts  --out-dir dist --extensions '.ts,.js'"},"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_0.0.1-beta0.4_1694535674952_0.5920056632592792","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@18f/identity-i18n","version":"1.0.0","license":"CC0-1.0","_id":"@18f/identity-i18n@1.0.0","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"0e8a382c171210057e303149bda55f0606861dac","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-1.0.0.tgz","fileCount":4,"integrity":"sha512-GqXlOJdgIT+iRG0EzaoEz1mKCJwJzUY+BUMWbRBcmjlKI83EN1y2MkuIJiVSWILBB4HsvYWwTicliH/JPzHhOQ==","signatures":[{"sig":"MEUCIQDQOSUqFub3zsYIaHT8ELOyCyWeJdK9gUxPSKgCkwYxkgIgR25M/gS9xTV0LZUy7O4gS3BKnHnhdBeNZThzXLEMbDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7396},"type":"module","exports":{".":{"source":"./index.ts","default":"./dist/index.js"}},"gitHead":"abf31f36dd6af2b90a65dcaec670fe60ccf0e0fe","private":false,"scripts":{"prepublishOnly":"babel index.ts --out-dir dist --extensions '.ts,.js'"},"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_1.0.0_1694621742412_0.8950184774162877","host":"s3://npm-registry-packages"}},"1.0.0-beta0.1":{"name":"@18f/identity-i18n","version":"1.0.0-beta0.1","license":"CC0-1.0","_id":"@18f/identity-i18n@1.0.0-beta0.1","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"a527077a2ec0b4a3d9c36bc6c626224b21d0e8db","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-1.0.0-beta0.1.tgz","fileCount":4,"integrity":"sha512-ZqQnQnDqBzs5eJ2+xsTROYQElITBc9PxwGxp7zh64uROj5DbYQmgIu1bMJCn3okU0T7qsat+iVyKYp4U6MHhRg==","signatures":[{"sig":"MEYCIQDuLVwOlmcROCh8io7ZQMrKkeMeU60Q2NYUK5QqnjuTLgIhAKYoZry3ud3ol2BSwrefx7w+2f0SpEypASu5w7BmgOqF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7178},"type":"module","exports":{".":{"source":"./index.ts","default":"./dist/index.js"}},"gitHead":"abf31f36dd6af2b90a65dcaec670fe60ccf0e0fe","private":false,"scripts":{"prepublishOnly":"babel index.ts --out-dir dist --extensions '.ts,.js'"},"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_1.0.0-beta0.1_1694624000458_0.29287317389766265","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@18f/identity-i18n","version":"1.0.1","license":"CC0-1.0","_id":"@18f/identity-i18n@1.0.1","maintainers":[{"name":"cvfergus","email":"charles.ferguson@gsa.gov"},{"name":"mneveunava","email":"micah.neveu@gsa.gov"},{"name":"nava-matt","email":"matt.gardner@gsa.gov"},{"name":"tts-tech-portfolio","email":"tts-tech-portfolio@gsa.gov"},{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"},{"name":"rori123","email":"rochelle.ribeiro@gsa.gov"},{"name":"aduth","email":"andrew@andrewduthie.com"}],"homepage":"https://github.com/18f/identity-idp","bugs":{"url":"https://github.com/18f/identity-idp/issues"},"dist":{"shasum":"9999f588a8b4e1771bca0cbe5143efa76c0b0b46","tarball":"https://registry.npmjs.org/@18f/identity-i18n/-/identity-i18n-1.0.1.tgz","fileCount":4,"integrity":"sha512-eM2f75rLtpoomFK7prUdG8M9zgLk0mkojiGHXAFQbRAAy+oL23AnbMRVwZA1AMYpX2bD0E9GNaK3s5DP7tsWNw==","signatures":[{"sig":"MEQCICDj1qf7Yaqh9JsBzIdDq3k6qVLNs/kwb+fxgp7trO3LAiBEQ2kc6fqULO13/Z1gRZKfwITfgDufCGQ8OM+w3QZ8Og==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7170},"type":"module","exports":{".":{"source":"./index.ts","default":"./dist/index.js"}},"gitHead":"9764b52a8934109f04d80f7d3a15e545597b04f2","private":false,"scripts":{"prepublishOnly":"babel index.ts --out-dir dist --extensions '.ts,.js'"},"_npmUser":{"name":"nava-matt","email":"matt.gardner@gsa.gov"},"repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"_npmVersion":"9.6.6","description":"JavaScript implementation of a Rails-like localization utility.","directories":{},"_nodeVersion":"18.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/identity-i18n_1.0.1_1694629384908_0.293965294536237","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-09-12T14:57:29.618Z","modified":"2026-07-30T16:17:32.078Z","0.0.1-beta0.1":"2023-09-12T14:57:29.878Z","0.0.1-beta0.2":"2023-09-12T15:17:01.857Z","0.0.1-beta0.3":"2023-09-12T15:19:02.921Z","0.0.1-beta0.4":"2023-09-12T16:21:15.116Z","1.0.0":"2023-09-13T16:15:42.583Z","1.0.0-beta0.1":"2023-09-13T16:53:20.583Z","1.0.1":"2023-09-13T18:23:05.107Z"},"bugs":{"url":"https://github.com/18f/identity-idp/issues"},"license":"CC0-1.0","homepage":"https://github.com/18f/identity-idp","repository":{"url":"git+https://github.com/18f/identity-idp.git","type":"git","directory":"app/javascript/packages/i18n"},"description":"JavaScript implementation of a Rails-like localization utility.","maintainers":[{"email":"devops@gsa.gov","name":"18f-devops"},{"email":"rochelle.ribeiro@gsa.gov","name":"rori123"},{"email":"sheldon@navapbc.com","name":"sb-nava"},{"email":"gina.yamada@gsa.gov","name":"ginayam"},{"email":"micah.neveu@gsa.gov","name":"mneveunava"},{"email":"tts-tech-portfolio@gsa.gov","name":"tts-tech-portfolio"},{"email":"michael.r.king@gsa.gov","name":"mkgsa"},{"email":"charles.ferguson@gsa.gov","name":"cvfergus"},{"email":"matt.gardner@gsa.gov","name":"nava-matt"},{"email":"keithwilliams@navapbc.com","name":"keithnava"},{"email":"tai@taigrr.com","name":"taigrr"},{"email":"luigi.ray-montanez@gsa.gov","name":"luigiraymontanez"},{"email":"john.jediny@gsa.gov","name":"jjediny"},{"email":"lakeisha.russell@gsa.gov","name":"lrussell01"},{"email":"gerardo.cruz-ortiz@gsa.gov","name":"gerardo.cruz-ortiz"},{"email":"aj.farkas@gsa.gov","name":"ajfarkas_gsa"}],"readme":"# `@18f/identity-i18n`\n\nJavaScript implementation of a Rails-like localization utility.\n\nWhen paired with [`@18f/identity-rails-i18n-webpack-plugin`](https://github.com/18F/identity-idp/tree/main/app/javascript/packages/rails-i18n-webpack-plugin), it provides a seamless localization experience to retrieve locale data from [Rails locale data](https://github.com/18F/identity-idp/tree/main/config/locales).\n\n## Usage\n\nUsage should provide a behavior similar to [Rails Internationalization](https://guides.rubyonrails.org/i18n.html), where a given key would be expected to match locale data based on the folder structure found in `config/locales`.\n\nFor example, a key of `foo.bar.baz`, would match the file at `config/locales/foo/en.yml` (for English locales), whose content includes...\n\n```yml\nen:\n  foo:\n    bar:\n      baz: Message\n```\n\n### Basic\n\nCall the translate function with a key to retrieve the translated message.\n\n```yml\n# config/locales/messages/en.yml\nen:\n  messages:\n    greeting: Hello world!\n```\n\n```ts\nimport { t } from '@18f/identity-i18n';\n\nt('messages.greeting');\n// \"Hello world!\"\n```\n\n### Interpolation\n\nInclude an object of variables to interpolate those values in the matched entry.\n\n```yml\n# config/locales/messages/en.yml\nen:\n  messages:\n    greeting: Hello %{recipient}!\n```\n\n```ts\nimport { t } from '@18f/identity-i18n';\n\nt('messages.greeting', { recipient: 'world' });\n// \"Hello world!\"\n```\n\n### Pluralization\n\nAn entry which is an object including `one` or `other` keys will automatically choose the correct message based on the `count` variable.\n\n```yml\n# config/locales/messages/en.yml\nen:\n  messages:\n    greeting:\n      one: Hello to you!\n      other: Hello to all!\n```\n\n```ts\nimport { t } from '@18f/identity-i18n';\n\nt('messages.greeting', { count: 1 });\n// \"Hello to you!\"\n\nt('messages.greeting', { count: 2 });\n// \"Hello to all!\"\n```\n\n### Array Values\n\nAn entry may be a single string or an array of strings. Passing an array of key(s) will return an array of messages.\n\n```yml\n# config/locales/messages/en.yml\nen:\n  messages:\n    greetings:\n      - Hello!\n      - Howdy!\n```\n\n```ts\nimport { t } from '@18f/identity-i18n';\n\nt(['messages.greetings']);\n// [\"Hello!\", \"Howdy!\"]\n```\n","readmeFilename":"README.md"}