Skip to content

Commit 2132f1e

Browse files
Merge pull request #677 from opentripplanner/docs-weblate
docs(README): Add i18n and Weblate overview.
2 parents be66238 + e0b3102 commit 2132f1e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Diff for: README.md

+31
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,37 @@ The same environment variables which affect the behavior of `yarn start` also af
3434
env JS_CONFIG=my-custom-js.js CUSTOM_CSS=my-custom-css.css yarn build
3535
```
3636

37+
## Internationalization
38+
39+
OTP-react-redux uses `react-intl` from the [`formatjs`](https://github.com/formatjs/formatjs) library for internationalization.
40+
Both `react-intl` and `formatjs` take advantage of native internationalization features provided by web browsers.
41+
42+
Language-specific content is located in YML files under the `i18n` folder
43+
(e.g. `en-US.yml` for American English, `fr.yml` for generic French, etc.).
44+
45+
Most textual content can also be customized using the `language` section of `config.yml`,
46+
whether for all languages at once or for each supported individual language.
47+
48+
### Contributing translations
49+
50+
OTP-react-redux now uses [Hosted Weblate](https://www.weblate.org) to manage translations!
51+
52+
<figure>
53+
<a href="https://hosted.weblate.org/engage/otp-react-redux/">
54+
<img src="https://hosted.weblate.org/widgets/otp-react-redux/-/horizontal-auto.svg" alt="Translation status" />
55+
</a>
56+
<figcaption>Translation status for
57+
<a href="https://hosted.weblate.org/engage/otp-react-redux/">OTP-react-redux and OTP-UI on Hosted Weblate</a>
58+
</figcaption>
59+
</figure>
60+
61+
62+
Translations from the community are welcome and very much appreciated,
63+
please see instructions at https://hosted.weblate.org/projects/otp-react-redux/.
64+
Community input from Weblate will appear as pull requests with changes to files in the `i18n` folder for our review.
65+
66+
If changes to a specific language file is needed but not enabled in Weblate, please open an issue or a pull request with the changes needed.
67+
3768
## Library Documentation
3869

3970
More coming soon...

0 commit comments

Comments
 (0)