How to add brand new language to UnityBase?


#1

We have a requirement from our customer to support Tajik language. How to add this language to UnityBase?


#2

Tutorial for UB 1.12 can be founded here, it’s still actual for UB4 (Use partners/partners for read-only access)

But, for sure, a good idea is to move this tutorial to ubjs WiKi, so contribution is welcome!


#3

Documentation provided works well in the case when the translation of basic system objects already exist. But in the case of “unknown” language, like Tajik, UnityBase fails to start with the following error:

Got error from getAppInfo Error: Required http://localhost:888/models/adminui-pub/locale/lang-tg.js?ubver=0b33e3b44d70122aef5ab51aea9865f0 is not accessible
at HTMLScriptElement.elm.onerror (injection:60)

IMHO in such case system should return resources in some basic language, like English or so. What are your thoughts?


#4

We don’t think so. @unitybase/adminui-pub model localization contains a basic resources for login form / change password form, etc. I think for Tajik user is more comfortable to see a Tajik login form at startup, right? So, for a brand new language, the right way is to contribute localization files to a platform, at last for @unitybase/adminui-pub. Just send us a translated lang-tg.js file from adminui-pub\locale and we add it to the UnityBase registry