This is a generic cookie banner plugin that I can use in any Kirby project.
So the problem is that one of my projects only uses the German language. When I log in to the panel and check the cookie banner, the translation is always in English. When I log out of the panel, everything works fine. With this method ‘$kirby->language()->code()’, I checked the language with and without login, and it always returns ‘de’.
There is only one language in the panel, and as I mentioned in my previous comment, I always get ‘de’ with or without logging in. But I’ll try with panel.language option.
@ahmetbora@texnixe Can you please help me regarding this. I’m new in kirby and can’t find any solution.
I also tried with panel.language option but it’s not working.
Just to make sure we are talking about the same thing. Is this a multi-language site with only one language enabled, or a standard site without languages? Are we talking about output in the frontend or in the Panel?
Currently, there is only one language on the site, but it will be multi-language in the future, which is why my plugin is generic enough to be used on other sites as well.
I am referring to the output in the frontend after logging into the panel.