lingui / js-lingui

🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
https://lingui.dev
MIT License
4.5k stars 378 forks source link
hacktoberfest i18n icu internationalization intl javascript localization messageformat react react-components react-native translation

Linguijs

🌍📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
![Main Suite][Badge-MainSuite-GithubCI] ![Release Workflow Testing][Badge-ReleaseWorkflowTesting-GithubCI] [![Code Coverage][Badge-Coverage]][Coverage] [![PRs Welcome][Badge-PRWelcome]][PRWelcome] [![Join the community on Discord][Badge-Discord]][Discord] [**Documentation**][Documentation] · [**Quickstart**](#quickstart) · [**Example**](#example) · [**Support**](#support) · [**Contribute**](#contribute) · [**License**](#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.

--- W3C Web Internationalization FAQ

Lingui is an easy yet powerful internationalization framework for global projects.

Quickstart

Install

Tutorials

Plugins

If you're a react-intl user, check out a comparison of react-intl and Lingui.

Example

Short example how i18n looks with JSX:

import { Trans } from "@lingui/macro"

function App() {
  return (
   <Trans id="msg.docs" /* id is optional */>
     Read the <a href="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 the Examples directory.

Support

If you are having issues, please let us know.

Contribute

Contribution to open-source project is everything from spreading the word, writing documentation to implement features and fixing bugs.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

License

The project is licensed under the MIT license.