I have a really strange behavior of my current kirby setup. I have a properly working multilanguage setup. The languages en and de are showing in the frontend as expected. The translations from the content, the language translations and plugin translations do what they should.
We need to add a new language es to the page. So we added a new language-file es.php to the kirby languages folder. Properly working We started to translate the content. Also properly working We started to add es.php files to the languages folder of some plugins. The translations are not picked up by kirby and we only see the default language
Strange is, that the “old” languages from the plugins still work. Does anyone have an idea how to further investigate or better to solve this issue?
This part I don’t quite understand. Are these files then included in the index.php of those plugins? Are these plugins you own plugins or third party plugins?
Kirby works with alpha 2 language codes most of the time[1], unless it’s not (I might have missed that in the docs) and as @texnixe pointed out, Spanish is available via es_419 and es_ES.
To me, it wasn’t entirely clear how the backend languages were related to the frontend languages.
The answer lies in AppTranslations.php public function translation
Where $inject holds all my es languages vars from my plugins, but since there is no es.json it gets nixed and the fallback language takes over.