- Notifications
You must be signed in to change notification settings - Fork0
License
andrii-bodnar/js-lingui
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
🌍📖 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 powerfulICU MessageFormat under the hood.
Universal - Use it everywhere.
@lingui/coreprovides the essential intl functionality which works in any JavaScript project while@lingui/reactoffers 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 LinguiCLI,Vite Plugin, andESLint 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 than3 kB gzipped, React components are additional1.4 kB gzipped.
Active community - Join the growingcommunity 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.
Short example how i18n looks with JSX:
import{Trans}from"@lingui/react/macro"functionApp(){return(<Transid="msg.docs"// Optional message idcomment="Docs link on the website"// Comment for translators, optional> Read the<ahref="https://lingui.dev">documentation</a> for more info.</Trans>)}
Message from this component will be extracted in following format:
msgid"msg.docs"msgstr"Read the <0>documentation</0> for more info."
For more example see theExamples directory.
If you are having issues, please let us know.
- Join us onDiscord to chat with the community.
- Ask questions onStackOverflow and mark it with the
linguijstag. - 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 alsoAsk Lingui JS Guru, it is a Lingui JS focused AI to answer your questions.
Contribution to open-source project is everything from spreading the word, writing documentation to implement features and fixing bugs.
- Do you useLingui in production site? Let us know!
- Have you seen any interesting talk or article abouti18n?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 thecontributors guide and send a PR!
This project exists thanks toall the people who contribute. [Contribute].
The project is licensed under theMIT license.
About
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- TypeScript90.1%
- MDX6.2%
- JavaScript2.0%
- SCSS1.5%
- Other0.2%