{"name":"@lingui/core","version":"6.7.0","keywords":["lingui","linguijs","i18n","icu","messageformat","catalog","runtime","localization","translation","pluralization"],"author":{"name":"Tomáš Ehrlich","email":"tomas.ehrlich@gmail.com"},"license":"MIT","_id":"@lingui/core@6.7.0","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":"44805c7f6a8c96d3b7f9e5c8379b6badbb7d591d","tarball":"http://registry-npm.ywwl.com/@lingui/core/download/@lingui/core-6.7.0.tgz","fileCount":8,"integrity":"sha512-dw6n4S/11ZQJZQZe85AMKOOU+q/D360H4NkWTBO6A597D+2FFkgdLQV89UCidTPyxiI7t5P4qrgcy4m53tQ/+g==","signatures":[{"sig":"MEYCIQCMTqS1XXVjVH/2JleLhK/SMpV23Zu5n0pFqwiHjnqVTAIhAKEgZpvPCJoHAZhVOgpAbG8jtZ4FcezXVzDtczc8Jmfc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDfDG/kp6gZSoMplMBfFuQqsGPGu5/5XUatP0e2ikHAPQIhAIZQHg5pf2dwbDrd4dLMnxtPWao7aYCNerp6AxHVndtI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@lingui%2fcore@6.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":30345,"size":8975,"noattachment":false,"key":"/@lingui/core/-/@lingui/core-6.7.0.tgz"},"type":"module","engines":{"node":">=22.19.0"},"exports":{".":"./dist/index.mjs","./macro":{"types":"./macro/index.d.mts","browser":"./macro/browser.mjs","default":"./macro/index.mjs"},"./package.json":"./package.json"},"gitHead":"a2d4b6d42e052fed1d432050b20cc56cfdacfe98","scripts":{"build":"unbuild","check-types":"tsc --noEmit"},"unbuild":{"declaration":"node16"},"_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/10.0.1/node@v22.23.2+x64 (linux)","description":"The Lingui i18n runtime: loads compiled message catalogs, tracks the active locale and formats ICU MessageFormat messages","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@lingui/message-utils":"6.7.0","@lingui/babel-plugin-lingui-macro":"6.7.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"catalog:","unbuild":"catalog:","typescript":"catalog:","@lingui/test-utils":"3.0.3"},"peerDependencies":{"babel-plugin-macros":"2 || 3"},"peerDependenciesMeta":{"babel-plugin-macros":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_6.7.0_1789138221247_0.49473741770472146","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":1789138221336,"_cnpm_publish_time":1789138221336,"dist-tags":{"canary":"5.1.2","latest":"6.11.0","next":"6.0.0-next.4"}}