🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
Installations
npm install @lingui/core
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Min. Node Version
>=20.0.0
Node Version
20.16.0
NPM Version
lerna/8.1.9/node@v20.16.0+arm64 (darwin)
Score
56
Supply Chain
72.6
Quality
95.5
Maintenance
100
Vulnerability
98.9
License
Releases
Contributors
Languages
TypeScript (90.01%)
MDX (6.4%)
JavaScript (1.9%)
SCSS (1.5%)
Vue (0.18%)
Shell (0.01%)
Developer
Download Statistics
Total Downloads
33,773,888
Last Day
8,572
Last Week
261,403
Last Month
1,149,697
Last Year
12,068,389
GitHub Statistics
4,768 Stars
2,505 Commits
386 Forks
32 Watching
7 Branches
220 Contributors
Package Meta Information
Latest Version
5.1.2
Package Id
@lingui/core@5.1.2
Unpacked Size
47.88 kB
Size
7.63 kB
File Count
10
NPM Version
lerna/8.1.9/node@v20.16.0+arm64 (darwin)
Node Version
20.16.0
Publised On
16 Dec 2024
Total Downloads
Cumulative downloads
Total Downloads
33,773,888
Last day
-8.1%
8,572
Compared to previous day
Last week
-11.2%
261,403
Compared to previous week
Last month
-13.9%
1,149,697
Compared to previous month
Last year
56.7%
12,068,389
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Peer Dependencies
2
Dev Dependencies
3
Linguijs
🌍📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
Documentation · Quickstart · Example · Support · Contribute · License
Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
Lingui is an easy yet powerful internationalization (i18n) framework for global projects.
-
Clean and readable - Keep your code clean and readable, while the library uses battle-tested and powerful ICU MessageFormat under the hood.
-
Universal - Use it everywhere.
@lingui/core
provides the essential intl functionality which works in any JavaScript project while@lingui/react
offers components to leverage React rendering, including React Server Components (RSC) support. -
Full rich-text support - Use React components inside localized messages without any limitation. Writing rich-text messages is as easy as writing JSX.
-
Powerful tooling - Manage your intl workflow with the Lingui CLI, Vite Plugin, and ESLint Plugin. The CLI extracts, compiles and validates messages, while the Vite plugin compiles catalogs on the fly, and the ESLint plugin helps catch common usage errors.
-
Unopinionated - Integrate Lingui into your existing workflow. It supports message keys as well as auto-generated messages. Translations are stored either in JSON or standard PO files, which are supported in almost all translation tools.
-
Lightweight and optimized - Core library is less than 3 kB gzipped, React components are additional 1.4 kB gzipped.
-
Active community - Join the growing community of developers who are using Lingui to build global products.
-
Compatible with react-intl - Low-level React API is very similar to react-intl and the message format is the same. It's easy to migrate an existing project.
Quickstart
Tutorials
Example
Short example how i18n looks with JSX:
1import { Trans } from "@lingui/react/macro" 2 3function App() { 4 return ( 5 <Trans id="msg.docs" /* id is optional */> 6 Read the <a href="https://lingui.dev">documentation</a> 7 for more info. 8 </Trans> 9 ) 10}
Message from this component will be extracted in following format:
1msgid "msg.docs" 2msgstr "Read the <0>documentation</0> for more info."
For more example see the Examples directory.
Support
If you are having issues, please let us know.
- Join us on Discord to chat with the community.
- Ask questions on StackOverflow and mark it with the
linguijs
tag. - If something doesn't work as documented, documentation is missing or if you just want to suggest a new feature, create an issue.
- You can also Ask Lingui JS Guru, it is a Lingui JS focused AI to answer your questions.
Contribute
Contribution to open-source project is everything from spreading the word, writing documentation to implement features and fixing bugs.
- Do you use Lingui in production site? Let us know!
- Have you seen any interesting talk or article about i18n? Share it!
- Have you found a bug or do you want to suggest a new feature? Create an issue!
- Do you want to improve the docs and write some code? Read the contributors guide and send a PR!
Contributors
This project exists thanks to all the people who contribute. [Contribute].
License
The project is licensed under the MIT license.
No vulnerabilities found.
Reason
30 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
Found 9/24 approved changesets -- score normalized to 3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/docs-suite.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint-pr-title.yml:1
- Warn: no topLevel permission defined: .github/workflows/main-suite.yml:1
- Warn: no topLevel permission defined: .github/workflows/next-sync.yml:1
- Warn: no topLevel permission defined: .github/workflows/release-docs.yml:1
- Warn: no topLevel permission defined: .github/workflows/release-test.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/size-limit.yml:1
- Info: no jobLevel write permissions found
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 27 are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs-suite.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/docs-suite.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs-suite.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/docs-suite.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-pr-title.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/lint-pr-title.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-suite.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/main-suite.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-suite.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/main-suite.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main-suite.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/main-suite.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-suite.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/main-suite.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-suite.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/main-suite.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/next-sync.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/next-sync.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/next-sync.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/next-sync.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/next-sync.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/next-sync.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-docs.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release-docs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-docs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release-docs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-docs.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release-docs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release-test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/size-limit.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/size-limit.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/size-limit.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/lingui/js-lingui/size-limit.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/release-test.yml:34
- Info: 0 out of 15 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 6 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
63 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-hpx4-r86g-5jrg
- Warn: Project is vulnerable to: GHSA-prr3-c3m5-p7q2
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986 / GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c59h-r6p8-q9wc
- Warn: Project is vulnerable to: GHSA-g77x-44xx-532m
- Warn: Project is vulnerable to: GHSA-7gfc-8cq8-jh5f
- Warn: Project is vulnerable to: GHSA-3q56-9cc2-46j4
- Warn: Project is vulnerable to: GHSA-6w63-h3fj-q4vw
- Warn: Project is vulnerable to: GHSA-3g92-w8c5-73pq
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-84jw-g43v-8gjm
- Warn: Project is vulnerable to: GHSA-g974-hxvm-x689
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4
Score
4.1
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More