Write a tutorial using LinguiJS with React
See original GitHub issueThis is a HactoberFest issue! Read the contest details for more info.
Before you begin
- Confirm that youāre working on this issue so I can add š©āš»assigned label.
- Use
next
branch as a base for your PR. This feature should be released in upcoming v3. - Read the contribution guide for info how to setup project, run tests and use development version of packages
- Join us on gitter to get support
Starting point
- Use the existing tutorial to learn about LinguiJS
- Use create-react-app to bootstrap example project. You should use create-react-app v2.
- Install
@lingui/react
and add@lingui/cli @lingui/macro
as development dependencies
Content
- You might use existing tutorial as a starting point but feel free to provide your own example.
- (optional) The challenge is that existing tutorial is written for LinguiJS v2, but the new tutorial should be for v3. If you feel ambitious, checkout migration guide for the list of changes. Otherwise, feel free to write the tutorial for LinguiJS v2 and Iāll rewrite examples afterwards. No big deal at all!
- (optional) Donāt worry about formatting! The documentation uses reStructuredText. Itās very similar to Markdown. If you find it confusing, focus on content and Iāll fix the markup once itās finished.
- The tutorial should cover following topics:
- Installation
- Project setup (
i18n
manager,I18nProvider
) Trans
component for messages, including how to use variables and inline tags- Translation of props using
i18n
manager (accessed throughI18n
render prop component orwithI18n
hoc) - Pluralization using
Plural
- Date/Number formatting using
DateFormat
andNumberFormat
- Working with CLI (adding locales, extracting, compiling)
- Loading catalogs into app (either directly or using
@lingui/loader
webpack loader)
Additional requirements
It might be beneficial if you have some experience with react-intl
or any internationalization library. I believe for the best result you shouldnāt be too much familiar with LinguiJS
. The tutorial should be for the first time users and for that reason itās hard for me to write it.
This is a very long task, so it might take several hours to finish it. Feel free to reach me at gitter anytime.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Tutorial - Internationalization of React apps - LinguiJS - JS.ORG
Through this tutorial, we'll learn how to add internationalization (i18n) to an ... Follow setup guide either for projects using LinguiJS with Create...
Read more >How to set up internationalization in React using Lingui.js
Here's how to integrate Lingui.js with a React app and add internationalization capabilities to your application.
Read more >Localizing JavaScript & React Apps with LinguiJS | Phrase
LinguiJS is a small, robust JavaScript and React i18n library that feels lean and elegant compared to its well-established competitors.
Read more >i18n of React with Lingui.js #1 - DEV Community ā ā
This configuration will extract messages from source files inside src directory and write them into message catalogs in src/locales . AddĀ ...
Read more >How to Localize JavaScript and React Apps with LinguiJS
Let's install Lingui in the app. Installing Lingui for React. I built the sample app with the Create React App starter template. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Iāve just realized that writing the tutorial for v3 might be much easier that I thought. Thereās already an example project. It doesnāt use create-react-app, but all new features from upcoming v3. All examples are basically in the main App.js file. The v3 prerelease is already published on NPM under
next
tag (npm install @lingui/cli@next
, etc). Might be worth taking a look, because v3 fixes a lot of issues with CRA.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.