diff --git a/guides/translation.md b/guides/translation.md index 3629349f2..596d7209a 100644 --- a/guides/translation.md +++ b/guides/translation.md @@ -20,9 +20,11 @@ Want to add a new language to our translations? Create a new branch on Github. -In the `packages/tldraw/src/translations` folder, duplicate the `en.json` file. +In the `packages/tldraw/src/translations` folder, duplicate the `en.json` file. -Rename the new file to [language code](https://gist.github.com/wpsmith/7604842) for that language. For example, if you were making an Esperanto translation, name the new file `eo.json`. 4. In the `packages/tldraw/src/translations/translations.ts` file, import your file and create a new entry in to the `TRANSLATIONS` array like this: +Rename the new file to the [language code](https://gist.github.com/wpsmith/7604842) for that language. For example, if you were making an Esperanto translation, name the new file `eo.json`. + +In the `packages/tldraw/src/translations/translations.ts` file, import your file and create a new entry in to the `TRANSLATIONS` array like this: ```ts import ar from './ar.json' @@ -30,10 +32,12 @@ import en from './en.json' import eo from './eo.json' // + export const TRANSLATIONS = { - { code: 'ar', label: 'عربي', messages: ar }, { code: 'en', label: 'English', messages: en }, + { code: 'ar', label: 'عربي', messages: ar }, { code: 'eo', label: 'Esperanto', messages: eo }, // + } as const ``` +That's it! + Submit your branch as a PR on Github.