Textual representation of dates in multilang setup

I would like to use the textual representation of a date field in a multilingual Kirby setup.

I have this to my config:

c::set('date.handler', 'strftime');

I have this to my template:

echo $page->date("%B %e, %G");

But the names of the months are always rendered in English?
How can I “fix” this so they use the correct language as set in c::set('languages') ?


You might have to experiment with the locale setting, in my local dev environment, for example, I have to set

c::set('locale','de_DE.UTF-8'); //note the slash between UTF and 8

to get the right month names. You might want to also check what is installed on your server…

You’re right. The locale “string” has to be exactly as listed in the server. Add that to the differences between local and production server and you’re in confusionland.

Anyway, this is fixed. For future reference: you can use the locale -a command to list all installed locales on your webserver.

Yes, but luckily, with Kirby you can use multiple config files for different environments.

I know. You guys did a great job making that!