Hey there,
i am not sure if this is really a bug, but:
I have 2 languages active on a site (german as default, english as second) and if i turn off the /de url particle via config (‘url’ => ‘/’) the locale won’t be set anymore for the english language. It stays de_DE.
If i turn back to each having their distinctive url particle, everything works fine…
Hello @texnixe,
i have a date field that should show the weekday in its language. It never did, so i started digging.
here you can see two versions of a kirby install:
&
in Version 2 i have added to the german language file this: ‘url’ => ‘/’
I am currently testing by just asking for the date:
Mhh, i changed the locale, but i think my problem is more basic. When i change the language, the locale doesn’t change at all. Stays de.
For my current project i just turned to a /de & /en logic, so it works and i think its no harm to have the /de string in there. i was just wondering, why this is happening, but i have no experience and tools to test anything that would explain it.
If you type locale -a into your terminal, what are the installed locales? You should get a list similar to this one and can then compare if what is set in your language definition is available on the server:
i think i have to give up, because i tested it on my server and on my local machine, and i have different results (server: de_DE.utf8 for both languages / localhost: de = C, en = en_US).
Both results are unsatisfying, but i found my workaround and leave it now. My knowledge of connecting to a webserver via Terminal or even finding out which system runs on the server (hetzner) is beyond my abilities.
Thanks so far and so much.
@possible:
Nevertheless I say thank you very much for your support.
Can you please tell us the OS of your servers here, could be important for further evaluation…
Within my site/config/config.php I set now for my German (one language) websites:
// set 'locale' to '' (or 'deu_DEU.utf8' or 'German_Germany.utf8') for Windows servers and to 'de_DE.utf8' for the rest
'locale' => [
LC_ALL => r((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'), '', 'de_DE.UTF8')
],
So there is no difference between my Windows development environment and the (Linux) live webserver for the file site/config/config.php!
Independent of this I use an additional file site/config/config.127.0.0.1.php for the development environment. This webserver XAMPP runs on my Win10 laptop…
For a multilingual website, you can add a corresponding functionality in the /site/languages/*.php files, if you need this. But I think, this is NOT necessary.