{"library":"po-loader","title":"po-loader","description":"Webpack loader for translating .po files (GNU gettext) into JSON. Uses po2json under the hood, supports mozilla/nunjucks, Jed, and other formats. Version 0.7.0 (latest, 2017). Sync and async usage; often paired with Jed for i18n. No updates since 2017, works with webpack v1 only. Not actively maintained; consider @lingui/webpack or i18n-webpack-plugin.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install po-loader"],"cli":null},"imports":["import messages from './locale.po';","var messages = require('json!po!./locale.po');","import localePromise from './locale.po'; // then call .then() or await"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\n{\n  test: /\\.po$/,\n  loader: 'json!po',\n  exclude: /node_modules/\n}\n\n// entry.js\nimport Jed from 'jed';\n\nasync function init() {\n  const localeData = await import('./locale/en_US/LC_MESSAGES/messages.po');\n  const i18n = new Jed(localeData);\n  console.log(i18n.gettext('Hello'));\n}\n\ninit();","lang":"javascript","description":"Webpack config to load .po files with po-loader and json-loader, then async import a .po file and use Jed.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}