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.
I hope anyone has an idea… Cheers!
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?
Iam working with Matthijs on the same issue.
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.
site.nl.txt and a site.en.txt both exist.
We are using 2.5.5.
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.
What exactly is in your config?
Enjoy the holiday break!
our config is a breaking one, that’s for sure
I’ll check back after the break. Have a nice time, enjoy!