I register and login as the first SuperAdmin. I’m able to switch between English and German (there are some missing translations in German).
However, when I go to my namespaces or modules, I’m unable to create translations for them - the language button is not there. Resource Translations :: Corteza Docs
I tried multiple combinations of LOCALE_LANGUAGES and LOCALE_PATH env.variables values. I also tried all Corteza versions from 2021 up. The example docker command above is just one of many, but the behavior (missing button for translations) is still the same.
And the last one was it - I had to add LOCALE_RESOURCE_TRANSLATIONS_ENABLED=true to my environment variables. I’m pretty sure i haven’t seen this one anywhere. So I will look in the documentation and add it somewhere.
I believe, this (below) is the intended behavior. I can’t see a reason to explicitly allow 2 languages and on top of that also explicitly allow translations.
* Resource translations are enabled when there is more than 1 language
* @returns {boolean}
*/
resourceTranslationsEnabled () {
return this.resourceTranslationLanguages.length > 1
},
@tjerman Is it a bug in the documentation? I still can’t find LOCALE_RESOURCE_TRANSLATIONS_ENABLED anywhere in the documentation, only mentioned here:
Or is it a bug in the code and instead of LOCALE_RESOURCE_TRANSLATIONS_ENABLED the condition should be whether LOCALE_LANGUAGES contains multiple languages?
I can do a pull request fixing any of these two. I just need a decision on what the intentions were.
Strange that it isn’t anywhere in the docs. It is referenced in the server .env.example
Like you said yourself, you have to have at least 2 languages defined and the LOCALE_RESOURCE_TRANSLATIONS_ENABLED has to be set to true to allow the button to be visible.