{"bugs":{"url":"https://github.com/yargs/y18n/issues"},"dist":{"shasum":"8db2b83c31c5d75099bb890b23f3094891e247d4","tarball":"https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz","fileCount":5,"integrity":"sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==","signatures":[{"sig":"MEUCIQCzSxGX2xT88JC38tkOY3FMEOQmn8VoRrVWPeBhis/TMgIgc4QveU6amA7jzOVwZFIu0xRnkHJHvmCNxFvxH7q7ey0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxYOnCRA9TVsSAnZWagAA5P8P/iI/sSK4+8fUc1ICCECl\nA2mO6qvLQL5986og3flimqfqExSQTdBeRgkQQBVRF3jgFPTS9yELqnP0WFGK\nyn87WKheRLCCTl0kWVGIsdV4VJwRdGe0AspfCU0jeNDAP1ywZvzMPFlxS+Pd\nt3Re8izZvrv9w5kmZFQdlZfusUvdBbS/f6MrS01kNkP0whgaAsFlhsEx/7TT\n+A3I5Rn/DHhmEc2yQx1ur19XQqlz4I5S4lJVPM1Or9kzS7w+UkxygY15A0Vy\n15d4Y91tOVpYlQ8BJA0Tiv5KonZXvnEdE5llOPHKFWrtAn+/IJHSze4lXcja\nUJ3Ah3hJgXNphR4uRSvLwBRJK8weRxGSq4rjAsmVqh+IYzl6DQqLxrcob3K0\nS2Ya9yj/+SBuYcXJPp98V1tOh53lW6sFrNcR4KvEsZhQauZoCDGB5w8qce5N\npyKDWpl+PPs4AIcyHbA7UsoernUefzj4zaISn4LCM0f+XiIf6UbtjX4S0b4c\nPLCngNnixH880sC13rqscvRiScpNGeGbX29y70H/S+sWFWX9t90P8VcxVA94\nxfckt2qTrEXnzm0eBNljLctzimomO/pkCsHDMB9LoLgGzTZy3pFmBJH+qGq2\nV1tpvtcSSK77Hw38yWBB6x0r/VqoVqpt34wE6LnJ8JFpUmgptQpdaVVrgrSr\nJv5I\r\n=EkkS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"y18n","author":{"name":"Ben Coe","email":"ben@npmjs.com"},"readme":"# y18n\n\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![NPM version][npm-image]][npm-url]\n[![js-standard-style][standard-image]][standard-url]\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nThe bare-bones internationalization library used by yargs.\n\nInspired by [i18n](https://www.npmjs.com/package/i18n).\n\n## Examples\n\n_simple string translation:_\n\n```js\nvar __ = require('y18n').__\n\nconsole.log(__('my awesome string %s', 'foo'))\n```\n\noutput:\n\n`my awesome string foo`\n\n_using tagged template literals_\n\n```js\nvar __ = require('y18n').__\nvar str = 'foo'\n\nconsole.log(__`my awesome string ${str}`)\n```\n\noutput:\n\n`my awesome string foo`\n\n_pluralization support:_\n\n```js\nvar __n = require('y18n').__n\n\nconsole.log(__n('one fish %s', '%d fishes %s', 2, 'foo'))\n```\n\noutput:\n\n`2 fishes foo`\n\n## JSON Language Files\n\nThe JSON language files should be stored in a `./locales` folder.\nFile names correspond to locales, e.g., `en.json`, `pirate.json`.\n\nWhen strings are observed for the first time they will be\nadded to the JSON file corresponding to the current locale.\n\n## Methods\n\n### require('y18n')(config)\n\nCreate an instance of y18n with the config provided, options include:\n\n* `directory`: the locale directory, default `./locales`.\n* `updateFiles`: should newly observed strings be updated in file, default `true`.\n* `locale`: what locale should be used.\n* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`)\n  be allowed if a file matching the locale does not exist (e.g. `en_US.json`),\n  default `true`.\n\n### y18n.\\_\\_(str, arg, arg, arg)\n\nPrint a localized string, `%s` will be replaced with `arg`s.\n\nThis function can also be used as a tag for a template literal. You can use it\nlike this: <code>__&#96;hello ${'world'}&#96;</code>. This will be equivalent to\n`__('hello %s', 'world')`.\n\n### y18n.\\_\\_n(singularString, pluralString, count, arg, arg, arg)\n\nPrint a localized string with appropriate pluralization. If `%d` is provided\nin the string, the `count` will replace this placeholder.\n\n### y18n.setLocale(str)\n\nSet the current locale being used.\n\n### y18n.getLocale()\n\nWhat locale is currently being used?\n\n### y18n.updateLocale(obj)\n\nUpdate the current locale with the key value pairs in `obj`.\n\n## License\n\nISC\n\n[travis-url]: https://travis-ci.org/yargs/y18n\n[travis-image]: https://img.shields.io/travis/yargs/y18n.svg\n[coveralls-url]: https://coveralls.io/github/yargs/y18n\n[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg\n[npm-url]: https://npmjs.org/package/y18n\n[npm-image]: https://img.shields.io/npm/v/y18n.svg\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n[standard-url]: https://github.com/feross/standard\n","gitHead":"8dc75802f3aa944bf9a827213969d64834621215","license":"ISC","scripts":{"test":"nyc mocha","pretest":"standard","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"homepage":"https://github.com/yargs/y18n","keywords":["i18n","internationalization","yargs"],"repository":{"url":"git+ssh://git@github.com/yargs/y18n.git","type":"git"},"_npmVersion":"6.14.8","description":"the bare-bones internationalization library used by yargs","directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"nexdrew","email":"andrewbgoode@gmail.com"},{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"}],"_nodeVersion":"14.14.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^11.0.1","chai":"^4.0.1","mocha":"^4.0.1","rimraf":"^2.5.0","standard":"^10.0.0-beta.0","coveralls":"^3.0.0","standard-version":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/y18n_4.0.1_1606779814627_0.7420427256466908","host":"s3://npm-registry-packages"},"_id":"y18n@4.0.1","version":"4.0.1"}