I am using the Uniform plugin for handling all the form stuff one needs. Our site is fully in german, so the Kirby’s config.php
has the setting 'locale' => 'de_DE'
. We don’t use the languages feature as we don’t expect to have multiple translations for our content.
When I’m now implementing e.g. the calc guard the error label is in English. I can see that mzur has translated alle the strings to German and several other languages. How can I force the plugin, to return the correct translation?
I’m really sure I’m missing something here… can somebody help me out? Thanks!
I’m picking up this topic because I had some time to fiddle around with Kirby.
When I activate Kirby’s multi language feature and define just one language, I’m getting the right translation for those error messages. So this might be a solution, but to be honest, this doesn’t feel right.
Try if this solution also works with the uniform plugin: Error.user.duplicate not showing translation if you set the language code to de
.
Yes, thanks Sonja! If I set the locale in my controller this way, everything is fine:
Kirby\Toolkit\I18n::$locale = 'de';
In case somebody else stumbles upon this, take a look at this github issue.