You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crowdin/README.md
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,4 +74,23 @@ This configuration is done via `gatsby-config.js`:
74
74
75
75
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.
76
76
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