Hi,
I’m working on a simple Online-Shop with the MERX-Plugin, and run into a problem with the go()-Helper inside routes in combination with a multi language setup. (standard language: de, secondary language: en)
this example-route uses the go()-Helper to go to the cart-Page after removing a product from the cart.
When a have english as current language a then use the empty-cart-route, it does what it should (removes all items and links me to the cart) except the language switches to the standard language. I want to see the cart in the current language.
Any suggestions? Am I use the go() helper wrong?
Hey, thanks for your idea. Unfortunately it doesn’t work.
After some further testing I can say: It looks like the $language = $kirby->language(); gives not the current language correctly. Is it because I call the object/method inside a route?
I tried this
Hi and thanks,
i am ashamed of myself, perhaps I’m to stupid, but I don’t understand it. @texnixe when you write “$language in this context gives you a language object” - does it gives me the language object of the current language? - this is, what I would need, but when I try your code I always see ‘de’ even when my current language is ‘en’…