Choosing language of multi-language plugin in single-language website

Hi,

I recently installed a multi-language plugin (de/en) on a single-language website (by ‘single-language’ I mean that in config.php languages is not(!) set to true). The plugin then picks a language (in my case English), but I’m not sure by which criterion the language is selected. The problem with this is that the website is basically in German, but some text from the plugin appears in English.

How can I prevent this without making the website (artificially) multi-language and picking my preferred language as default? Is there a way to set a default language in a plugin (I have control over the plugin) or for the single-language website?

Just setting 'languages' => true in config.php is not enough for fixing this as I would have to add a language code manually to each existing page content file, which I want to avoid.

Any hints how this is possible?

Thanks in advance and best regards,
Steffen

Which plugin is it?

It’s a self-developed plugin for testing. It’s not public at the moment. What do you need to know?

You can set the locale in your config https://getkirby.com/docs/reference/system/options/locale.

Thanks for the suggestion. It didn’t work with

'locale' => 'de_DE.utf-8'

but

'hooks' => [
    'route:after' => function () {
        Kirby\Toolkit\I18n::$locale = 'de';
    },
],

did the trick.
The solution is from the issue/idea here: https://github.com/getkirby/ideas/issues/459 I hope for a nicer way to do this in the future, but for now this is perfectly fine.
Thanks for guiding my thoughts in that direction, Sonja. :wink: