Skip to content

Commit 695a917

Browse files
committed
It is no longer necessary to manually add language options for localization
1 parent e2353be commit 695a917

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

LOCALIZING.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,6 @@ In computing, localization is the process of adapting software to different lang
44

55
This guide explains how to contribute a new localization to this workshopper. If you are an international user and would like to bring Nodeschool workshops to a broader audience, please consider contributing a localization! It is simple, fun, and enables more people to learn and practice.
66

7-
## Add the language option
8-
9-
In the `index.js` file, the workshopper is instantiated with a list of supported translations. In order to add a new language, add its code to the array:
10-
11-
```js
12-
const workshopper = require('workshopper-adventure')({
13-
appDir: __dirname,
14-
languages: ['en', 'ja', 'zh-cn'],
15-
header: require('workshopper-adventure/default/header'),
16-
footer: require('./lib/footer.js')
17-
})
18-
```
19-
20-
If you want to add a new language, e.g. Spanish, add an entry `'es'` to the array:
21-
22-
```js
23-
, languages: ['en', 'es', 'ja', 'zh-cn']
24-
```
25-
267
## Menu
278

289
The menu of the workshopper greets the user with a list of problem names. The strings for these names are contained in the top level `menu.json` file. Translations of problem names should be placed in a JSON file inside the `i18n` folder named with the language code, e.g. `es.json`. Use an existing translation file as reference, ensuring it's up to date with the contents of `menu.json`.

0 commit comments

Comments
 (0)