{"_id":"i18n-loader","_rev":"32-174953087f4c52591ad6019e8fc9a8b8","name":"i18n-loader","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"i18n-loader","version":"0.1.0","author":{"name":"Tobias Koppers @sokra"},"license":"MIT","_id":"i18n-loader@0.1.0","maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"dist":{"shasum":"498b54b47605baa65fb4b75f27f67baeb1400bf3","tarball":"https://registry.npmjs.org/i18n-loader/-/i18n-loader-0.1.0.tgz","integrity":"sha512-rg6i9jfZuG01F8twfiaP+v3e90kp94auebgzoyD6enCyPqsQJC/onZLdnY5Cfbdp8WRrYnenhjLqzwIXDj1Dpg==","signatures":[{"sig":"MEUCIDz0ViS5VAk489+wd9cLzaMKcmu6NnFOnUxhlKxw3sLYAiEAnJMpR3A4g7HhGMBsJclyWs5ibR+ftZDJdBOeqvPTdZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"engines":{"node":"*"},"_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"licenses":[{"url":"http://www.opensource.org/licenses/mit-license.php","type":"MIT"}],"_npmVersion":"1.1.21","description":"i18n loader module for webpack","directories":{},"_nodeVersion":"v0.6.17","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{}},"0.1.1":{"name":"i18n-loader","version":"0.1.1","author":{"name":"Tobias Koppers @sokra"},"license":"MIT","_id":"i18n-loader@0.1.1","maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"dist":{"shasum":"878d18c4b547112a2e59222acac8ccac480e7dd3","tarball":"https://registry.npmjs.org/i18n-loader/-/i18n-loader-0.1.1.tgz","integrity":"sha512-fb1Vnca034FL/jJoPGFClPaTgZ7iRMT/8MVFzDI5ZC7u0sM98poYubO6uTI5NVd2oDouVaMRnBKhB41KxiPa0w==","signatures":[{"sig":"MEYCIQDV/wUyrsQw7GPlaqv338t9bzS/pzzFou7QFfTqX6aPPQIhAPiIrIH9shAPREc6RAtwdTJdvFrtYj6ShpEYiyvn8qlP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"engines":{"node":"*"},"_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"licenses":[{"url":"http://www.opensource.org/licenses/mit-license.php","type":"MIT"}],"_npmVersion":"1.1.21","description":"i18n loader module for webpack","directories":{},"_nodeVersion":"v0.6.17","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{}},"0.2.0":{"name":"i18n-loader","version":"0.2.0","author":{"name":"Tobias Koppers @sokra"},"license":"MIT","_id":"i18n-loader@0.2.0","maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"dist":{"shasum":"8166e7a7228a4be46db91f628da5e2baa2685224","tarball":"https://registry.npmjs.org/i18n-loader/-/i18n-loader-0.2.0.tgz","integrity":"sha512-KhQqzjBgLMna37jlNU8zMpQYpVsFVj5e1ui83C/2ISdr6RZ8d6FBst/mK6P0fwtT8iHMiIz97TSZSTBW4t39Sg==","signatures":[{"sig":"MEQCIGzq2MDjxU58D4kVHjjiQxxh4MNn0TsWpo2qEEfkpYg2AiAiStI12PMze5AE5VComcEu+quHBJgFhpaaGpfAbLvGRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"licenses":[{"url":"http://www.opensource.org/licenses/mit-license.php","type":"MIT"}],"_npmVersion":"1.1.59","description":"i18n loader module for webpack","directories":{}},"0.3.0":{"name":"i18n-loader","version":"0.3.0","author":{"name":"Tobias Koppers @sokra"},"license":"MIT","_id":"i18n-loader@0.3.0","maintainers":[{"name":"sokra","email":"tobias.koppers@googlemail.com"}],"dist":{"shasum":"2b878521b08817f16320c16f0ada45915aa049a4","tarball":"https://registry.npmjs.org/i18n-loader/-/i18n-loader-0.3.0.tgz","integrity":"sha512-IHRXdqnH1f+wPc012cxE9Hv4Hdyu1+UMk/mMlk0tdDT5pcaqs+8vz6it4HiJpu579VFsLQImQ67L7AZjj/Ze+A==","signatures":[{"sig":"MEQCIHj1ovYMfCxs+M2BuzGKW7KSSDaXR9Lzm5uSXFe0B5q0AiBaBQb5i4K83daNVxhgBif2JPDm03tvckTJbxEeH/74zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2t4fCRA9TVsSAnZWagAAp94QAIDTLGBsz/nZzyjyycH2\nEIYk/wf5wVZeiXv0W9wnEO1meB9Xt9XYBTkm88+TH89y3aT4dDl7fpIeNJPB\nL6LCUkNAS1bgVmbeC617Nnr0g+SKPEma+08ydj8m/Uo6AvYmLpCcJsiEFeWu\n+VR9llbLJ3HZI32/CI6y5JSVmIePHfKMpODzn4i7VDH3uYWvZdDpqZqOCe3k\nGHr2jq9yUYuf87n3yZoP+t6FFOXW5qgYGhXaUZOUhlShx9IhkJd09+lE6gjk\nVG6WdiyfYfJyE7UNgYLYeDD6I3tAICB1vElTglhjq3dI2XFME/cyARVzrjod\nIRQ21qtjPBLDwnLKLArZTj35u1aIUkuZR5fXB+xJeqXWJ5u2KgcP6YYEPq+E\ntnT2nehRLOne8m6x8Ua0fdKlNvgmeeuAKYezerxm6shSMuvnxZZ+NCF4mF6K\nRUFyA5VdO3LkyIi49CDcG041ZlTiVuU4Axda9YIxwPVsnGsT6YegXLDeplOq\nEHL200TUzyopQ+47sevdCkTmZqWfkxFRonn8PS46tVWfKtfXmQg5xfNG0Jar\n5bZqP29uLexJOeTXn6DAhbDYDx1nUe/UuPWypGaHGh8mW8qcQWijdbZMATS/\nh5luorBSdUYeSycZElNpERD5Mv6Orh8dxsxifepr5LhLmTigTP1uBreEotFN\nEO4Y\r\n=7JGX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sokra","email":"tobias.koppers@googlemail.com"},"licenses":[{"url":"http://www.opensource.org/licenses/mit-license.php","type":"MIT"}],"_npmVersion":"1.1.59","description":"i18n loader module for webpack","directories":{}}},"time":{"created":"2012-05-18T14:25:26.713Z","modified":"2026-04-20T02:29:36.834Z","0.1.0":"2012-05-18T14:25:29.646Z","0.1.1":"2012-05-18T14:48:53.742Z","0.2.0":"2012-08-23T18:26:06.085Z","0.3.0":"2012-09-25T14:49:45.881Z"},"author":{"name":"Tobias Koppers @sokra"},"license":"MIT","description":"i18n loader module for webpack","maintainers":[{"email":"sheo13666q@gmail.com","name":"evilebottnawi"},{"email":"tobias.koppers@googlemail.com","name":"sokra"},{"email":"mail@johannesewald.de","name":"jhnns"}],"readme":"# i18n loader for webpack\r\n\r\n## Usage\r\n\r\n### ./colors.json\r\n\r\n``` javascript\r\n{\r\n\t\"red\": \"red\",\r\n\t\"green\": \"green\",\r\n\t\"blue\": \"blue\"\r\n}\r\n```\r\n\r\n### ./de-de.colors.json\r\n\r\n``` javascript\r\n{\r\n\t\"red\": \"rot\",\r\n\t\"green\": \"gr�n\"\r\n}\r\n```\r\n\r\n### call it\r\n\r\n``` javascript\r\n// assuming our locale is \"de-de-berlin\"\r\nvar locale = require(\"i18n!./colors.json\");\r\n\r\n// wait for ready, this is only required once for all locales in a web app\r\n// because all locales of the same language are merged into one chuck\r\nlocale(function() {\r\n\tconsole.log(locale.red); // prints rot\r\n\tconsole.log(locale.blue); // prints blue\r\n});\r\n```\r\n\r\n### options\r\n\r\nYou should tell the loader about all your locales, if you want to load them once\r\nand than want to use them synchronous.\r\n\r\n``` javascript\r\n{\r\n\t\"i18n\": {\r\n\t\t\"locales\": [\r\n\t\t\t\"de\",\r\n\t\t\t\"de-de\",\r\n\t\t\t\"fr\"\r\n\t\t],\r\n\t\t// \"bundleTogether\": false\r\n\t\t// this can disable the bundling of locales\r\n\t}\r\n}\r\n```\r\n\r\n### alternative calls\r\n\r\n``` javascript\r\nrequire(\"i18n/choose!./file.js\"); // chooses the correct file by locale,\r\n\t\t\t\t\t// but it do not merge the objects\r\nrequire(\"i18n/concat!./file.js\"); // concatinate all fitting locales\r\nrequire(\"i18n/merge!./file.js\"); // merges the resulting objects\r\n\t\t\t\t\t// ./file.js is excuted while compiling\r\nrequire(\"i18n!./file.json\") == require(\"i18n/merge!json!./file.json\")\r\n```\r\n\r\nDon't forget to polyfill `require` if you want to use it in node.\r\nSee `webpack` documentation.\r\n\r\n## License\r\n\r\nMIT (http://www.opensource.org/licenses/mit-license.php)","readmeFilename":""}