In a multilanguage setup we can’t seem to read the $site variables in the current language… Is this a known issue?
We have NL content on the main domain and an english version of the site on the /en urls. If we request $site->something() in a template we always get the NL version of that variable, even if we are on the /en page.
No, that shouldn’t be the case. You can see in a Langkit that this is not the case, because the site title as part of the site object appears once in German and once in English when you change the language. Have you made sure that you have a site.en.txt and site.nl.txt?
It seems that the Site Object is always using the default language.
When we switch the default from nl to en the Site Object switch to the new default.
I can’t reproduce this in a 2.5.5 Langkit either. Are you using any spedific config settings, rewrite rules/routes or whatever? No other stray file in the content folder?
Do both language versions contain the correct content? No empty fields in the English version?
hmm debugging revealed an issue in our setup. after the kirby() init we do 2 c::sets. When I remove those, all works well… weird… Thanks for looking into it and your quick reply! We’ll be working on it next year and try to work around it.