Language specific date output

Hello,
I found several issues to the more or less same thing. But no solution solved my problem.

I’m in a German environment without the language support by Kirby.
A simple output of the day with date()->toDate('l') shows “Monday” instead “Montag” for example.

My config has the following entries:

'locale' => [
            'LC_ALL' => 'de_DE.UTF-8'
        ],

    'date'  => [
      'handler' => 'intl'
    ],

I tried also the international date handler but without success.

I need a hint.

Thank you

There are two possible causes I can think of based on what you describe:

  • The l symbol for the weekday is for the date handler. With the intl handler the matching symbol is E. So if you get a weekday output with l, the intl date handler setting in your config might not have taken effect. You can verify this by printing option('date.handler').
  • The names of the system locales differ between systems. Please ensure that de_DE.UTF-8 is the correct name on your system and that the locale is installed. You can verify this by running locale -a on the command line of your server. You can only use the locales listed by this command.

Thank you Lukas,

I had a typo with the system locales. My server provide de_DE.utf8 and not de_DE.UTF-8.