Skip to content

Translations

Tomasz Pilch edited this page Dec 10, 2020 · 3 revisions

Translation support

Default translations are in /public/static/defaultLocales, this folder contains default namespaces and texts for initial functionality and default modules.

Custom translations (ui app)

If you want enable custom translations, you must:

  1. install @bheui/server-functions
  2. create custom server.js
  3. there you place processLocale() after prepare() from nextJS (const processLocale = require('@bheui/server-functions/lib/locale/process-locale'))
  4. and that's all

locales are downloaded when app starts (running server required)

Server app

  1. install @bhe/core-modules min version 1.2.1
  2. in the root of the app, create folder locales
  3. locales folder contains folders that's symbolize languages (cs, en)
  4. cs, en folders contains .json files => namespaces
Clone this wiki locally