I have a small problem, I do most of my stuff in one Language and that’s ok, but from time to time, another language comes into play. In a one language installation, you can’t call $kirby->language() right? But is there a way to deal with both of them? Most of my plugins work in one language, but not in multilanguage. If I change them, they work in Multilanguage but not on sites that have only one language … this seems to be a hard case but are there any workarounds?
Translations of course also work in no-language installations. If you use translations in your plugin, like in this example plugin in conjunction with the
t() helper (https://github.com/schnti/kirby3-cookie/blob/master/snippets/cookie.php) and set the locale in your config, you are good to go.