{"name":"@lingui/core","version":"5.9.5","keywords":["i18n","i10n","i9n","internationalization","localization","translation","multilingual"],"author":{"name":"Tomáš Ehrlich","email":"tomas.ehrlich@gmail.com"},"license":"MIT","_id":"@lingui/core@5.9.5","maintainers":[{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"},{"name":"serhiydmytryshyn","email":"sergey@crowdin.com"}],"homepage":"https://lingui.dev","bugs":{"url":"https://github.com/lingui/js-lingui/issues"},"dist":{"shasum":"013608197d24309df3cf41a1ae60caf5146351f4","tarball":"http://registry-npm.ywwl.com/@lingui/core/download/@lingui/core-5.9.5.tgz","fileCount":10,"integrity":"sha512-Y+iZq9NqnqZOqHNgPomUFP21KH/zs4oTTizWoz0AKAkBbq9T9yb1DSz/ugtBRjF1YLtKMF9tq28v3thMHANSiQ==","signatures":[{"sig":"MEQCICOmXZbvwhCt5C63PaEmJDXg6iaLkNQW1AeyL54bLDpxAiAXOf++J7lwfl6WYfYo0JfkggdwDu3pjPFotabPgMEkJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@lingui%2fcore@5.9.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55383,"size":8601,"noattachment":false,"key":"/@lingui/core/-/@lingui/core-5.9.5.tgz"},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./macro":{"types":"./macro/index.d.ts","default":"./macro/index.js"},"./package.json":"./package.json"},"gitHead":"7b55bd79898d1e9e5a7d32f3c72d017be82e51b3","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6cc62ee-aab3-49a1-9110-300405c1e3df"}},"repository":{"url":"git+https://github.com/lingui/js-lingui.git","type":"git","directory":"packages/core"},"_npmVersion":"lerna/9.0.0/node@v20.20.2+x64 (linux)","description":"I18n tools for javascript","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@babel/runtime":"^7.20.13","@lingui/message-utils":"5.9.5"},"_hasShrinkwrap":false,"devDependencies":{"unbuild":"2.0.0","@lingui/jest-mocks":"*"},"peerDependencies":{"babel-plugin-macros":"2 || 3","@lingui/babel-plugin-lingui-macro":"5.9.5"},"peerDependenciesMeta":{"babel-plugin-macros":{"optional":true},"@lingui/babel-plugin-lingui-macro":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_5.9.5_1775462838278_0.7805080322579232","host":"s3://npm-registry-packages-npm-production"},"readme":"[![License][badge-license]][license]\n[![Version][badge-version]][package]\n[![Downloads][badge-downloads]][package]\n\n# @lingui/core\n\n> The Lingui i18n runtime: loads compiled message catalogs, tracks the active locale and formats ICU MessageFormat messages\n\n`@lingui/core` is part of [Lingui][documentation]. Lingui is a lightweight, open-source internationalization (i18n) library for JavaScript and TypeScript. It brings compile-time macros and a CLI for message extraction to React, React Native, Vue, SolidJS, Astro, Svelte, and Node.js.\n\nThe package is framework-agnostic and behaves the same in the browser, in Node.js and inside any UI framework. `@lingui/core` exports the `i18n` instance, which loads catalogs, activates a locale and translates messages. `@lingui/core/macro` exports the `t`, `plural`, `select` and related macros, which are compiled into ICU messages at build time and need the [Babel][babel-plugin] or [SWC][swc-plugin] plugin.\n\n## Usage\n\n```js\nimport { i18n } from \"@lingui/core\"\nimport { t } from \"@lingui/core/macro\"\nimport { messages } from \"./locales/cs/messages\"\n\ni18n.load(\"cs\", messages)\ni18n.activate(\"cs\")\n\nfunction greeting(name) {\n  return t`Hello ${name}`\n}\n\ngreeting(\"Fred\") // \"Ahoj Fred\"\n```\n\nThe `messages` module is produced by `lingui extract` and `lingui compile` from [`@lingui/cli`][cli]. Catalogs are compiled ahead of time, so the runtime ships without a MessageFormat parser.\n\nThe [JavaScript tutorial][tutorial] walks through this setup. React projects use [`@lingui/react`][react] on top of this package. See the [core reference][reference] and the [macro reference][macro] for the full API.\n\n## License\n\nThis package is licensed under the [MIT][license] license.\n\n[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE\n[documentation]: https://lingui.dev\n[tutorial]: https://lingui.dev/tutorials/javascript\n[reference]: https://lingui.dev/ref/core\n[macro]: https://lingui.dev/ref/macro\n[cli]: https://www.npmjs.com/package/@lingui/cli\n[react]: https://www.npmjs.com/package/@lingui/react\n[babel-plugin]: https://lingui.dev/installation#choosing-a-transpiler\n[swc-plugin]: https://lingui.dev/ref/swc-plugin\n[package]: https://www.npmjs.com/package/@lingui/core\n[badge-downloads]: https://img.shields.io/npm/dw/@lingui/core.svg\n[badge-version]: https://img.shields.io/npm/v/@lingui/core.svg\n[badge-license]: https://img.shields.io/npm/l/@lingui/core.svg\n","publish_time":1775462838425,"_cnpm_publish_time":1775462838425,"dist-tags":{"canary":"5.1.2","latest":"6.11.0","next":"6.0.0-next.4"}}