{"name":"@lingui/core","version":"5.6.0","keywords":["i18n","i10n","i9n","internationalization","localization","translation","multilingual"],"author":{"name":"Tomáš Ehrlich","email":"tomas.ehrlich@gmail.com"},"license":"MIT","_id":"@lingui/core@5.6.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":"5191bf09d3cbaef0839a8e7c7c8bc41dc9ce186b","tarball":"http://registry-npm.ywwl.com/@lingui/core/download/@lingui/core-5.6.0.tgz","fileCount":10,"integrity":"sha512-s+WOjytLPBi1O3VT8wBklteK8PPPrmuox7A2mEPUO0QOqfFK4mzt5Bdok4RK+MCV61ampLByLlOUwS/NQEGWoQ==","signatures":[{"sig":"MEYCIQDNHr1xvyU90je8DgBDlHC8cl7/P04IU92PX9qeREcLNgIhAOhNN2EomidAknrG87As+tF4boSeBT+xqqNrbYT/CTYT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@lingui%2fcore@5.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55383,"size":8597,"noattachment":false,"key":"/@lingui/core/-/@lingui/core-5.6.0.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":"6a8e2a60cf936ba8dc7ae09442ba616e5e4e9e5d","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.19.5+x64 (linux)","description":"I18n tools for javascript","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@babel/runtime":"^7.20.13","@lingui/message-utils":"5.6.0"},"_hasShrinkwrap":false,"devDependencies":{"unbuild":"2.0.0","@lingui/jest-mocks":"*"},"peerDependencies":{"babel-plugin-macros":"2 || 3","@lingui/babel-plugin-lingui-macro":"5.6.0"},"peerDependenciesMeta":{"babel-plugin-macros":{"optional":true},"@lingui/babel-plugin-lingui-macro":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_5.6.0_1762934147128_0.27825012553932305","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":1762934147292,"_cnpm_publish_time":1762934147292,"dist-tags":{"canary":"5.1.2","latest":"6.11.0","next":"6.0.0-next.4"}}