Get current language inside a controller

Where is the error thrown? Are you passing the variable to the template? Since you are defining the variable in your controller, it can’t possibly be undefined unless you don’t pass it to the template or wherever you are then using that variable.

Welcome to the Kirby forum!

1 Like