Skip to content

Add a new language

Nastya Birillo edited this page Apr 6, 2021 · 3 revisions

In the default configuration, the following languages are available:

  • en - English
  • ru - Russian

To add a new language

  1. Specify a key for the language in the LANGUAGES variable from the const file.
const LANGUAGES = ['en', 'ru', 'de'];

In this example, de stands for the newly added German language and should be replaced by an appropriate key.

  1. Add the following line for the new language to the Task model in the task model file.
de: { type: Schema.ObjectId, ref: 'TaskDescription' }
  1. Add the following line for the new language to the Settings model in the settings model file.
de: { type: Schema.ObjectId, ref: 'SettingsDescription' }
  1. Add the following line for the new language to the Gender model in the gender model file.
de: { type: String },
  1. Add the following line for the new language to the Country model in the country model file.
de: { type: String },
  1. Add the following line for the new language to the Experience model in the experience model file.
de: { type: String },
  1. Add texts in the new language to the following models using TaskTracker API or config files: