{"_id":"hexo-i18n","_rev":"30-12472f6e3a2fcffbec79aed725a8cdc2","name":"hexo-i18n","dist-tags":{"latest":"2.0.0"},"versions":{"0.0.1":{"name":"hexo-i18n","version":"0.0.1","keywords":["hexo","i18n"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@0.0.1","maintainers":[{"name":"tommy351","email":"tommy351@gmail.com"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"dist":{"shasum":"9a8634e65a36b696711fc67f69ca06a0e4ef1369","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-0.0.1.tgz","integrity":"sha512-EjBjHLxk8Fc3MIuxpVYmHQe/pvfdeP7jpwe36SMFKDYGwzM1fZtNErSwJ1WWnjw2DxHk8XNh3EGcWx5uxwRHNg==","signatures":[{"sig":"MEYCIQCK5rb4hptWfReaDktWW7OUouf8ueX8lsQJvTJfylJhpQIhAIB7ifiS32/gfImYtLXmg2XO1CVyC3b7cBBxDurnuRZk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/i18n","_from":".","_shasum":"9a8634e65a36b696711fc67f69ca06a0e4ef1369","engines":{"node":">= 0.10.0"},"gitHead":"eeb30d6fc6ee93fac855b1bda680a9401656be77","scripts":{"test":"gulp test"},"_npmUser":{"name":"tommy351","email":"tommy351@gmail.com"},"repository":{"url":"https://github.com/hexojs/i18n","type":"git"},"_npmVersion":"2.1.8","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"0.10.33","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","gulp":"^3.8.9","mocha":"^2.0.1","rimraf":"^2.2.8","coveralls":"^2.11.2","gulp-mocha":"^2.0.0","gulp-jshint":"^1.8.6","gulp-istanbul":"^0.5.0","jshint-stylish":"^1.0.0","gulp-load-plugins":"^0.7.0"}},"0.1.0":{"name":"hexo-i18n","version":"0.1.0","keywords":["hexo","i18n"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@0.1.0","maintainers":[{"name":"tommy351","email":"tommy351@gmail.com"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"dist":{"shasum":"66f5b834b55b1ce796b3f14b6c8fff9f30bd1bbb","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-0.1.0.tgz","integrity":"sha512-lofwh7uoGX8xrLwpFvCP3OgXIa6vFO0GyyL6w3IllCXxuLvaRTqQFfwkVS694VimNy/tmKLKczOT+EP7EXpykA==","signatures":[{"sig":"MEYCIQCgo4Q6ET1O9td7o+tgEzy6af10FIDU8T5gjeB4PgT3PAIhAIl5aBp0R8xbxXKmIu52YrQWtyXb/7gORJkFJfutb3hz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/i18n","_from":".","_shasum":"66f5b834b55b1ce796b3f14b6c8fff9f30bd1bbb","engines":{"node":">= 0.10.0"},"gitHead":"ed2a7915cf780b2b919fb3a388049142c557b1da","scripts":{"test":"gulp test"},"_npmUser":{"name":"tommy351","email":"tommy351@gmail.com"},"repository":{"url":"https://github.com/hexojs/i18n","type":"git"},"_npmVersion":"2.1.8","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"0.10.33","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","gulp":"^3.8.9","mocha":"^2.0.1","rimraf":"^2.2.8","coveralls":"^2.11.2","gulp-mocha":"^2.0.0","gulp-jshint":"^1.8.6","gulp-istanbul":"^0.5.0","jshint-stylish":"^1.0.0","gulp-load-plugins":"^0.7.0"}},"0.2.0":{"name":"hexo-i18n","version":"0.2.0","keywords":["hexo","i18n","localization"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@0.2.0","maintainers":[{"name":"tommy351","email":"tommy351@gmail.com"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/i18n/issues"},"dist":{"shasum":"864e22b7eb8f622298e1131a0a5adf08f44f5ef8","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-0.2.0.tgz","integrity":"sha512-hepF3lVBc5zOucVlhhdFFWbM9CsBbD/CvRzt7vvkDbLQV507e0GEEsnNftFg8rRWUb6eUrZDMAAfmA5rfC10PA==","signatures":[{"sig":"MEQCIGsNJp3ruW9YU2y498Xzps93z/jktipdkw1VQ6XAC/SPAiBQmPZmXMQoMtpG4/7IhYmRdp/OkJ7aowv0oP1xN1lJyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/i18n","_from":".","_shasum":"864e22b7eb8f622298e1131a0a5adf08f44f5ef8","engines":{"node":">= 0.10.0"},"gitHead":"d137dc5275055b173158be616877d2a45c9fe585","scripts":{"test":"gulp test"},"_npmUser":{"name":"tommy351","email":"tommy351@gmail.com"},"repository":{"url":"https://github.com/hexojs/i18n","type":"git"},"_npmVersion":"2.2.0","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"0.10.35","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","gulp":"^3.8.9","mocha":"^2.0.1","rimraf":"^2.2.8","coveralls":"^2.11.2","gulp-mocha":"^2.0.0","gulp-jshint":"^1.8.6","gulp-istanbul":"^0.5.0","jshint-stylish":"^1.0.0","gulp-load-plugins":"^0.7.0"}},"0.2.1":{"name":"hexo-i18n","version":"0.2.1","keywords":["hexo","i18n","localization"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@0.2.1","maintainers":[{"name":"tommy351","email":"tommy351@gmail.com"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"dist":{"shasum":"84f141432bf09d8b558ed878c728164b6d1cd6de","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-0.2.1.tgz","integrity":"sha512-QhVmN/eLohu9UzvrX85zhfL7yN5O4MOkXKYmCRI8GPcg0EczX+blYYmMCugZKu/NIJ9XD5/etAVWCi/5F+fS6g==","signatures":[{"sig":"MEUCIQDNvCns/RDAGk6Hj/3NuIdBt2OIReA6UFq3J6e/GorhOwIgYelpBuQV16md4/wA0GQHHH7MHXtbaxc1VBDzS6XJ2ew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/i18n","_from":".","_shasum":"84f141432bf09d8b558ed878c728164b6d1cd6de","engines":{"node":">= 0.10.0"},"gitHead":"a1780f69cf844998136547547957a5a186fef043","scripts":{"test":"gulp test"},"_npmUser":{"name":"tommy351","email":"tommy351@gmail.com"},"repository":{"url":"https://github.com/hexojs/hexo-i18n","type":"git"},"_npmVersion":"2.5.1","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"0.12.0","dependencies":{"sprintf-js":"^1.0.2"},"devDependencies":{"chai":"^1.9.1","gulp":"^3.8.9","mocha":"^2.0.1","rimraf":"^2.2.8","coveralls":"^2.11.2","gulp-mocha":"^2.0.0","gulp-jshint":"^1.8.6","gulp-istanbul":"^0.5.0","jshint-stylish":"^1.0.0","gulp-load-plugins":"^0.7.0"}},"1.0.0":{"name":"hexo-i18n","version":"1.0.0","keywords":["hexo","i18n","localization"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@1.0.0","maintainers":[{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"yoshinorin","email":"nayo-msoft@outlook.jp"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"dist":{"shasum":"7983fb3a313e90615b84dd8fa946a71c489ef5bd","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-1.0.0.tgz","fileCount":4,"integrity":"sha512-yw90JHr7ybUHN/QOkpHmlWJj1luVk5/v8CUU5NRA0n4TFp6av8NT7ujZ10GDawgnQEdMHnN5PUfAbNIVGR6axg==","signatures":[{"sig":"MEUCIHN1kGcoqLNAh0lNOU2gwNnyZfhiDik0qPlZbfFHsbMGAiEA+NWdfat7ToK8YwFZvbZ+h2qhUspkKSn09kgDE5chmI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJda0dCCRA9TVsSAnZWagAAcD8P/0GVXzNF6M2xDQg2aAW1\n1wqKK3ZjLBD21oGgc+gOT7dlrDztU+iOhhmlj6zsVmqNdvGeTSAaU65MzRFh\nkQkOrDes5zKpatZYxglc1Rtm4qkErjTPY8TrzYhANsGJ2he63i6e7WPy9XHw\nCkdSMcugqJD5e+E2vsphpW3PBFH36mUfepfyGK+3W9XBUGCM2laXhfhoJbyr\ni4Lg9hQ55ticqqeRMRYH9Etcb6Fog9+CSL7PLE3st2M1QM0/yybOJELyalGs\nFk/DX049kXu9eX+hTH0zQuePC7FY3n11KKlbNjqHBZdvuA+DR39PKLxDGzzo\nNc2h9J0JaLSqDGgBPp5/Ii414Mt1lmqMzOVt9F9avB5ObCiUo5csaBFH0WZc\nEdGOoYLxIFWRQT0BZLjgJ+FlPsHRLBZ/1H6v03BYTxTP5J0OMWR23eX1zChA\nfKKQTXWUrJlOU0WnOa6mCnO3A+bg1R/uH0hELOIPJ5Rzl7j9hEwhv9uRFcWx\nCDwFuHaBvtYAZLKW8HNc8MaBaLDlEW30yqbz/h5k8A5O2TBFwu9+HilkuWRe\ntH5HLUg+/OlelECTZttJGGlaBnyVyjyU+OTrE0qNYGEiEYnD2yirlY5Rhj02\nuNMkgeQdcqcspczTAuhLd+yngC1lbeZ8O1U5LbWUkiHXoqWbrUvKHFhSn0Mf\nR+W4\r\n=4901\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/i18n.js","engines":{"node":">=8.6.0"},"gitHead":"4b9ad1003b69433052ea9da3f895c426ee3be4f0","scripts":{"test":"mocha test/index.js","eslint":"eslint .","test-cov":"nyc npm run test"},"_npmUser":{"name":"curben","email":"bushedge@protonmail.com"},"repository":{"url":"git+https://github.com/hexojs/hexo-i18n.git","type":"git"},"_npmVersion":"6.10.2","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"10.16.1","dependencies":{"sprintf-js":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.0.2","eslint":"^6.1.0","eslint-config-hexo":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hexo-i18n_1.0.0_1567311682302_0.32538714746292485","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"hexo-i18n","version":"2.0.0","keywords":["hexo","i18n","localization"],"author":{"url":"https://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-i18n@2.0.0","maintainers":[{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"yoshinorin","email":"yoshinorin.net@outlook.com"}],"homepage":"https://hexo.io/","bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"dist":{"shasum":"ec7abc160ffef202524f3ff8076b85d5701c447b","tarball":"https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-2.0.0.tgz","fileCount":6,"integrity":"sha512-dkUXecEtChaQMdTHN4WR13c8GwKqjbSOZPJS9qDqV6Ebnb77Wa/nQzWFckhP0dCps3a9lUQBd8hYGOMbOosiQQ==","signatures":[{"sig":"MEYCIQDBXJ36v28Yw5zB3VAayBmZEnoI9OgtZzo1cZqC07p/vQIhAKV424gd6KH8l0oDUDDEtIieBuET71/2s+qewO4JX6s2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11176,"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"},"main":"dist/i18n.js","types":"./dist/i18n.d.ts","engines":{"node":">=14"},"gitHead":"0226fa86fcf094e11945f5081e284a9009ea9665","scripts":{"test":"mocha test/index.js --require ts-node/register","build":"tsc -b","clean":"tsc -b --clean","eslint":"eslint .","pretest":"npm run clean && npm run build","test-cov":"c8 --reporter=lcovonly npm run test","prepublish ":"npm run clean && npm run build"},"_npmUser":{"name":"yoshinorin","email":"yoshinorin.net@outlook.com"},"repository":{"url":"git+https://github.com/hexojs/hexo-i18n.git","type":"git"},"_npmVersion":"8.4.0","description":"i18n module for Hexo.","directories":{"lib":"./lib"},"_nodeVersion":"16.16.0","dependencies":{"sprintf-js":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.12.0","chai":"^4.3.6","mocha":"^10.1.0","eslint":"^8.26.0","ts-node":"^10.9.1","typescript":"^4.8.4","@types/node":"^18.11.8","@types/sprintf-js":"^1.1.2","eslint-config-hexo":"^5.0.0","@typescript-eslint/parser":"^5.41.0","@typescript-eslint/eslint-plugin":"^5.41.0"},"_npmOperationalInternal":{"tmp":"tmp/hexo-i18n_2.0.0_1667905624491_0.674277795254161","host":"s3://npm-registry-packages"}}},"time":{"created":"2015-01-08T16:27:21.499Z","modified":"2026-05-15T14:49:24.782Z","0.0.1":"2015-01-08T16:27:21.499Z","0.1.0":"2015-01-09T04:28:23.965Z","0.2.0":"2015-01-18T15:54:18.489Z","0.2.1":"2015-02-11T06:52:17.854Z","1.0.0":"2019-09-01T04:21:22.441Z","2.0.0":"2022-11-08T11:07:04.653Z"},"bugs":{"url":"https://github.com/hexojs/hexo-i18n/issues"},"author":{"url":"https://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","homepage":"https://hexo.io/","keywords":["hexo","i18n","localization"],"repository":{"url":"git+https://github.com/hexojs/hexo-i18n.git","type":"git"},"description":"i18n module for Hexo.","maintainers":[{"email":"hi@abnerchou.me","name":"abnerchou"},{"email":"tommy351@gmail.com","name":"tommy351"},{"email":"jlhwung@gmail.com","name":"jlhwung"},{"email":"piartt@gmail.com","name":"tomap"},{"email":"yoshinorin.net@outlook.com","name":"yoshinorin"}],"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/","readmeFilename":"README.md"}