Skip to content

How to add a translation?

MilTy edited this page Jun 7, 2021 · 1 revision

1. Add a custom translation JSON to trans/

Use trans/en.json or trans/ru.json to see which keys should your translation file contain.

1. Register your translation in webpack.config.ts

First, import your translation JSON as module. Then, you will need to add properties to TRANSLATIONS constant (key: translation id (string); value: language display name) and to LITERALS constant (key: translation id (same as above); value: language JSON module). You're done!

Clone this wiki locally