Update translation.md
This commit is contained in:
parent
026177a1e1
commit
574b29ebdd
1 changed files with 7 additions and 5 deletions
|
@ -27,15 +27,17 @@ Rename the new file to the [language code](https://gist.github.com/wpsmith/76048
|
|||
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'
|
||||
import en from './en.json'
|
||||
import eo from './eo.json' // +
|
||||
import ar from './ar.json'
|
||||
import eo from './eo.json' // <-- import here
|
||||
|
||||
export const TRANSLATIONS = {
|
||||
export const TRANSLATIONS: TDTranslations = [
|
||||
// Default language:
|
||||
{ code: 'en', label: 'English', messages: en },
|
||||
// Translations:
|
||||
{ code: 'ar', label: 'عربي', messages: ar },
|
||||
{ code: 'eo', label: 'Esperanto', messages: eo }, // +
|
||||
} as const
|
||||
{ code: 'eo', label: 'Esperanto', messages: eo }, // <-- add an entry here
|
||||
]
|
||||
```
|
||||
|
||||
That's it!
|
||||
|
|
Loading…
Reference in a new issue