Access custom language variables in a route

Is it possible to access custom language variables inside a route?

I tried var_dump(l::get('varname')); inside my custom route.
This returns null?

Inside any other snippet or template this seem to work though? Do I have to load them or something? If so, how? Thanks!

You might want to check out this post for a workaround.

Awesome, @texnixe. I did search around the forums :wink:

For reference; adding the code below did the trick:

// Include the language file.
include_once(kirby()->roots()->languages() . DS . str::lower($lang) . '.php');