Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Latest commit

 

History

History
19 lines (10 loc) · 1.75 KB

README.md

File metadata and controls

19 lines (10 loc) · 1.75 KB

Localization

This folder contains localization files that dictate how text is displayed on the website for a specific language.

We use react-intl as the localization framework. extract.js script is used to extract all localizable text in the codebase to en_US.pot localization template file. After the template is localized to another language, generate.js script is used to generate .json files from .po files, which makes the localized strings accessible at runtime.

react-intl uses ICU MessageFormat syntax; a basic understanding of this syntax is necessary. There are many tutorials and examples on Google to help you.

Using Weblate

We have a project on Weblate, a continuous translation platform where anyone can sign up for free and contribute without much technical knowledge. This method is usually preferred over submitting localization manually via pull requests.

Manual translation

You can use any text editor to edit .po and .pot files. Specialized editors such as Poedit are also a popular choice.

Before submitting a localization, you should ensure that all fields have been translated and that they are both syntactically and semantically correct in the context of their usage.

You should follow the [development guide](../README.md#Local development) to start the website in your local environment to test localizations. Don't forget to update index.ts file to include your new localization in the listing!