What’s your Kirby version?
What is the default language?
Please post your language configuration?
Are you using any plugins/routes/custom code that might cause this?
I cannot reproduce this behavior in a fresh 3.9.6.1 Starterkit with languages enabled.
I think I’ve found where the issue lies. There is some custom routing in the site config; for routes meeting a certain condition I need altered content to be returned, for all routes not matching the condition the regular page content should be returned. I’ve implemented this as follows (reduced version):
When removing this routing pattern, all subpages return the correct current language.
In my understanding, page($targetRoute) would simply return the called page just as if it had been accessed without any special routing rules in place, which it does, just in the default language i.o. the actual current language. I naively thought, including the $lang string in the URL passed to the page() method would fix this…
Ah, I did not know that, thank you for pointing it out. Including the language key fixes the problem, all routes now return the actual current language.