Skip to content

Commit d5211dc

Browse files
author
Brian Vaughn
committed
Updated Crowdin README
1 parent 753d2c7 commit d5211dc

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

crowdin/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,23 @@ This configuration is done via `gatsby-config.js`:
7474

7575
Because of the default initial symlink (`crowdin/__translated__/en-US/docs` -> `content/docs`) Gatsby will still serve English content when run locally, even if the Crowdin script has not been run. This should enable fast iteration and creation of new content.
7676

77-
Translations can be updated by running `yarn crowdin:download` (or automatically as part of CI deployment).
77+
Translations can be updated by running `yarn crowdin:download` (or automatically as part of CI deployment).
78+
79+
### Language selector
80+
81+
The Yarn task `crowdin:update-languages` determines which translated languages have been downloaded. (This task is automatically run before `yarn dev` or `yarn build` in order to just-in-time update the list.) The task writes a list of locales to a local JSON file, `languages.json`:
82+
83+
```sh
84+
.
85+
└── crowdin
86+
   ├── __exported__
87+
  │   └── # ...
88+
├── __translated__
89+
  │   └── # ...
90+
├── __untranslated__
91+
  │   └── # ...
92+
├── translated-languages.json # This is the list of local translations
93+
   └── # ...
94+
```
95+
96+
This `languages.json` list is imported into a translations page (`pages/translations.js`) and used to create a list of links to translated docs.

0 commit comments

Comments
 (0)