{"versions":{"1.0.0":{"name":"hexo-i18n","version":"1.0.0","description":"i18n module for Hexo.","main":"lib/i18n.js","scripts":{"eslint":"eslint .","test":"mocha test/index.js","test-cov":"nyc npm run test"},"directories":{"lib":"./lib"},"engines":{"node":">=8.6.0"},"repository":{"type":"git","url":"git+https://github.com/hexojs/hexo-i18n.git"},"homepage":"http://hexo.io/","keywords":["hexo","i18n","localization"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"http://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.0.3"},"devDependencies":{"chai":"^4.2.0","eslint":"^6.1.0","eslint-config-hexo":"^3.0.0","mocha":"^6.0.2","nyc":"^14.1.1"},"gitHead":"4b9ad1003b69433052ea9da3f895c426ee3be4f0","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"_id":"hexo-i18n@1.0.0","_nodeVersion":"10.16.1","_npmVersion":"6.10.2","dist":{"shasum":"7983fb3a313e90615b84dd8fa946a71c489ef5bd","size":2871,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-1.0.0.tgz"},"maintainers":[{"name":"anonymous","email":"zhcjtht@hotmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"nayo-msoft@outlook.jp"}],"_npmUser":{"name":"anonymous","email":"bushedge@protonmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hexo-i18n_1.0.0_1567311682302_0.32538714746292485"},"_hasShrinkwrap":false,"publish_time":1567311682441,"_cnpm_publish_time":1567311682441,"contributors":[]},"0.2.1":{"name":"hexo-i18n","version":"0.2.1","description":"i18n module for Hexo.","main":"lib/i18n","scripts":{"test":"gulp test"},"directories":{"lib":"./lib"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"https://github.com/hexojs/hexo-i18n"},"homepage":"http://hexo.io/","keywords":["hexo","i18n","localization"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"http://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","coveralls":"^2.11.2","gulp":"^3.8.9","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.8.6","gulp-load-plugins":"^0.7.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","mocha":"^2.0.1","rimraf":"^2.2.8"},"gitHead":"a1780f69cf844998136547547957a5a186fef043","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"_id":"hexo-i18n@0.2.1","_shasum":"84f141432bf09d8b558ed878c728164b6d1cd6de","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"tommy351@gmail.com"},"maintainers":[{"name":"anonymous","email":"zhcjtht@hotmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"nayo-msoft@outlook.jp"}],"dist":{"shasum":"84f141432bf09d8b558ed878c728164b6d1cd6de","size":3090,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-0.2.1.tgz"},"publish_time":1423637537854,"_cnpm_publish_time":1423637537854,"_hasShrinkwrap":false,"contributors":[]},"0.2.0":{"name":"hexo-i18n","version":"0.2.0","description":"i18n module for Hexo.","main":"lib/i18n","scripts":{"test":"gulp test"},"directories":{"lib":"./lib"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"https://github.com/hexojs/i18n"},"homepage":"http://hexo.io/","keywords":["hexo","i18n","localization"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"http://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","coveralls":"^2.11.2","gulp":"^3.8.9","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.8.6","gulp-load-plugins":"^0.7.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","mocha":"^2.0.1","rimraf":"^2.2.8"},"gitHead":"d137dc5275055b173158be616877d2a45c9fe585","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"_id":"hexo-i18n@0.2.0","_shasum":"864e22b7eb8f622298e1131a0a5adf08f44f5ef8","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"anonymous","email":"tommy351@gmail.com"},"maintainers":[{"name":"anonymous","email":"zhcjtht@hotmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"nayo-msoft@outlook.jp"}],"dist":{"shasum":"864e22b7eb8f622298e1131a0a5adf08f44f5ef8","size":3071,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-0.2.0.tgz"},"publish_time":1421596458489,"_cnpm_publish_time":1421596458489,"_hasShrinkwrap":false,"contributors":[]},"0.1.0":{"name":"hexo-i18n","version":"0.1.0","description":"i18n module for Hexo.","main":"lib/i18n","scripts":{"test":"gulp test"},"directories":{"lib":"./lib"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"https://github.com/hexojs/i18n"},"homepage":"http://hexo.io/","keywords":["hexo","i18n"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"http://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","coveralls":"^2.11.2","gulp":"^3.8.9","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.8.6","gulp-load-plugins":"^0.7.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","mocha":"^2.0.1","rimraf":"^2.2.8"},"gitHead":"ed2a7915cf780b2b919fb3a388049142c557b1da","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"_id":"hexo-i18n@0.1.0","_shasum":"66f5b834b55b1ce796b3f14b6c8fff9f30bd1bbb","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"anonymous","email":"tommy351@gmail.com"},"maintainers":[{"name":"anonymous","email":"zhcjtht@hotmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"nayo-msoft@outlook.jp"}],"dist":{"shasum":"66f5b834b55b1ce796b3f14b6c8fff9f30bd1bbb","size":3019,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-0.1.0.tgz"},"publish_time":1420777703965,"_cnpm_publish_time":1420777703965,"_hasShrinkwrap":false,"contributors":[]},"0.0.1":{"name":"hexo-i18n","version":"0.0.1","description":"i18n module for Hexo.","main":"lib/i18n","scripts":{"test":"gulp test"},"directories":{"lib":"./lib"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"https://github.com/hexojs/i18n"},"homepage":"http://hexo.io/","keywords":["hexo","i18n"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"http://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","coveralls":"^2.11.2","gulp":"^3.8.9","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.8.6","gulp-load-plugins":"^0.7.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","mocha":"^2.0.1","rimraf":"^2.2.8"},"gitHead":"eeb30d6fc6ee93fac855b1bda680a9401656be77","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"_id":"hexo-i18n@0.0.1","_shasum":"9a8634e65a36b696711fc67f69ca06a0e4ef1369","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"anonymous","email":"tommy351@gmail.com"},"maintainers":[{"name":"anonymous","email":"zhcjtht@hotmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"nayo-msoft@outlook.jp"}],"dist":{"shasum":"9a8634e65a36b696711fc67f69ca06a0e4ef1369","size":2262,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-0.0.1.tgz"},"publish_time":1420734441499,"_cnpm_publish_time":1420734441499,"_hasShrinkwrap":false,"contributors":[]},"2.0.0":{"name":"hexo-i18n","version":"2.0.0","description":"i18n module for Hexo.","main":"dist/i18n.js","scripts":{"prepublish ":"npm run clean && npm run build","build":"tsc -b","clean":"tsc -b --clean","eslint":"eslint .","pretest":"npm run clean && npm run build","test":"mocha test/index.js --require ts-node/register","test-cov":"c8 --reporter=lcovonly npm run test"},"directories":{"lib":"./lib"},"types":"./dist/i18n.d.ts","engines":{"node":">=14"},"repository":{"type":"git","url":"git+https://github.com/hexojs/hexo-i18n.git"},"homepage":"https://hexo.io/","keywords":["hexo","i18n","localization"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com","url":"https://zespia.tw"},"license":"MIT","dependencies":{"sprintf-js":"^1.1.2"},"devDependencies":{"@types/node":"^18.11.8","@types/sprintf-js":"^1.1.2","@typescript-eslint/eslint-plugin":"^5.41.0","@typescript-eslint/parser":"^5.41.0","c8":"^7.12.0","chai":"^4.3.6","eslint":"^8.26.0","eslint-config-hexo":"^5.0.0","mocha":"^10.1.0","ts-node":"^10.9.1","typescript":"^4.8.4"},"gitHead":"0226fa86fcf094e11945f5081e284a9009ea9665","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"_id":"hexo-i18n@2.0.0","_nodeVersion":"16.16.0","_npmVersion":"8.4.0","dist":{"integrity":"sha512-dkUXecEtChaQMdTHN4WR13c8GwKqjbSOZPJS9qDqV6Ebnb77Wa/nQzWFckhP0dCps3a9lUQBd8hYGOMbOosiQQ==","shasum":"ec7abc160ffef202524f3ff8076b85d5701c447b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/hexo-i18n/-/hexo-i18n-2.0.0.tgz","fileCount":6,"unpackedSize":11176,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBXJ36v28Yw5zB3VAayBmZEnoI9OgtZzo1cZqC07p/vQIhAKV424gd6KH8l0oDUDDEtIieBuET71/2s+qewO4JX6s2"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjajhYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdeQ//bkns2KY9PkAapsEtoTaFNAPQc+JjQv2y2nB6BkJR5ZSRDlUI\r\nLtzv1xo2M90KPNnNjNuub/+3iNIF/eIDIScdu7xBek0GmZQlDO/Qn8uR7toq\r\ntaO49fca/GP6H2ZmuDysirVpW/OfWx/V4qfijYQE98QCeX0qL42o9om7l+L8\r\nhyHqMZ3v0hf2ek66U+TkinF9LCzjMN9rdThX5Ul3rlBtp5cDQRXjbRXebzGO\r\nb2XfH1QIu2+MgN3ByWjb74exfDdm689ur9X62W8eE5NyejH4pPuHeKT42WJH\r\n2QpYZdd6r2wMJFWRVEIv2t2Oy1lvj3V+sMwYENBdj4TXRgvZwPxuh7fIEb0B\r\nHMFrkT/u536T3QuCDmPNpuHjyDQGbSw4YaHC51FEljxzvmdzQwav0iFHJFRv\r\nRhFXFspTIKnEPn+O1PDFqplnC9f8PEgHZDhf/PeFC8TSEz6CQkcWXPOBleCV\r\neCJHsrmCjmV7yBHURJetioEh7RGvVeqSJ7S0EWI3z1JCm4zPVgH+UgNwYjDi\r\nC1Bw0LR0DsPwLDvWLwQ1kbZWH/XG2xJawD0wWS1xZ8vetYaegKmFOTr6SbW2\r\nM+F/aCfuhNnuOmnKdwdShuZDeV8OO8kFAH3LGB4jkGHYqzX+FrpwEQ6DPquR\r\nybG9UBt37NQgHn6r4BsHJKgiBe1CtXMuBBs=\r\n=DtOs\r\n-----END PGP SIGNATURE-----\r\n","size":3954},"_npmUser":{"name":"anonymous","email":"yoshinorin.net@outlook.com"},"maintainers":[{"name":"anonymous","email":"mateusz.derks@gmail.com"},{"name":"anonymous","email":"hi@abnerchou.me"},{"name":"anonymous","email":"tommy351@gmail.com"},{"name":"anonymous","email":"hexojs@gmail.com"},{"name":"anonymous","email":"i@jhuang.me"},{"name":"anonymous","email":"piartt@gmail.com"},{"name":"anonymous","email":"bushedge@protonmail.com"},{"name":"anonymous","email":"yoshinorin.net@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hexo-i18n_2.0.0_1667905624491_0.674277795254161"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-08T11:47:56.849Z","contributors":[]}},"dist-tags":{"latest":"2.0.0"},"name":"hexo-i18n","time":{"modified":"2026-05-15T14:49:34.479Z","created":"2022-01-26T21:36:42.555Z","1.0.0":"2019-09-01T04:21:22.441Z","0.2.1":"2015-02-11T06:52:17.854Z","0.2.0":"2015-01-18T15:54:18.489Z","0.1.0":"2015-01-09T04:28:23.965Z","0.0.1":"2015-01-08T16:27:21.499Z","2.0.0":"2022-11-08T11:07:04.653Z"},"readme":"# hexo-i18n\n\n[![Build Status](https://github.com/hexojs/hexo-i18n/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-i18n/actions?query=workflow%3ATester)\n[![NPM version](https://badge.fury.io/js/hexo-i18n.svg)](https://www.npmjs.com/package/hexo-i18n)\n[![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-i18n.svg)](https://coveralls.io/r/hexojs/hexo-i18n?branch=master)\n\ni18n module for [Hexo].\n\n## Installation\n\n``` bash\n$ npm install hexo-i18n --save\n```\n\n## Usage\n\n### Example\n\n``` js\nvar i18n = new require('hexo-i18n')({\n  languages: ['zh-TW', 'en']\n});\n\ni18n.set('en', {\n  ok: 'OK',\n  name: 'My name is %1$s %2$s.',\n  index: {\n    title: 'Home'\n  },\n  video: {\n    zero: 'No videos',\n    one: 'A video',\n    other: '%d videos'\n  }\n});\n\ni18n.set('zh-TW', {\n  name: '我的名字是 %2$s %1$s。',\n  index: {\n    title: '首頁'\n  },\n  video: {\n    zero: '沒有影片',\n    one: '一部影片',\n    other: '%d 部影片'\n  }\n});\n\nvar __ = i18n.__();\nvar _p = i18n._p();\n\n__('ok') // OK\n__('index.title') // 首頁\n__('name', '大呆', '王') // 我的名字是王大呆\n_p('video', 0) // 沒有影片\n_p('video', 1) // 一部影片\n_p('video', 10) // 10 部影片\n```\n\n### new i18n([options])\n\nCreates a new i18n instance.\n\nOption | Description | Default\n--- | --- | ---\n`languages` | Default languages. It can be an array or a string | `default`\n\n### i18n.get([lang]) → Object\n\nReturns a set of localization data. `lang` can be an array or a string, or the default language defined in constructor if not set. This method will build the data in order of languages.\n\n### i18n.set(lang, data)\n\nLoads localization data.\n\n### i18n.remove(lang)\n\nUnloads localization data.\n\n### i18n.list()\n\nLists loaded languages.\n\n### i18n.__() → Function(key, arg...)\n\nReturns a function for localization.\n\n### i18n._p() → Function(key, count, ...)\n\nThis method is similar to `i18n.__`, but it returns pluralized string based on the second parameter. For example:\n\n``` js\n_p('video', 0) = __('video.zero', 0)\n_p('video', 1) = __('video.one', 1)\n_p('video', 10) = __('video.other', 10)\n```\n\n## License\n\nMIT\n\n[Hexo]: https://hexo.io/","users":{}}