Set the Locale to german?

I am currently learning Kirby so please forgive any stupid questions from me.
I would like to change the PHP Locale to German so that the Events section (taken from the sample files) shows the dates in german. I have added the Locale settings to the config file but nothing is changing.

Here is my config file:

<?php
return [
	'panel' =>[
    	'install' => true
		]
];

return [
  'locale' => 'de_DE.utf-8'
];

And here the call I am making:

<h4><?= $schreibwerkstatt_single->from()->toDate('%A, j. F Y') ?></h4>

Two questions I have, 1. how to make the Locale set for german, and 2. what is the correct way to build the config file, should there be just one ‘return ’ or should there be more which are broken down into parts?

Thanks for any help :slight_smile:

Your problem are the two return statements, see Configuration | Kirby CMS

Thank you.
Config.php now looks like this:

<?php
return [
	'panel' =>[
    	'install' => true
		],
	'locale' => 'de_DE.utf-8'
];

Which is not throwing an error, super.
But it is also not changing the dates to german…

You have to set the date handler: date | Kirby CMS (since strftime will get deprecated, better use intl) and the right pattern syntax for that handler.

Ok, thanks, that is now working as expected :raised_hands:

Hm for me it is not working. My config return:

'locale' => 'de_DE.utf-8',
'date'  => ['handler' => 'intl'],

In my template:

<?php $days = $page->children()->sortBy("datum", "asc")->pluck("datum", ",", true); ?>
<?php foreach ($days as $day): ?>
     <li><?= date('D d. M Y', strtotime($day)) ?></li>
<?php endforeach; ?>

My output:

Fri 14. Jun 2024
Sat 15. Jun 2024
Sun 16. Jun 2024

But I want:

Freitag 14. Juni 2024
Samstag 15. Juni 2024
Sonntag 16. Juni 2024

intl is a php extension. Is it installed on your server?

<?= $day(new IntlDateFormatter("de_DE", IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Europe/Berlin')) ?>

should output a date like:
Montag, 29. Januar 2024

More infos about the the IntlDateFormatter class here:
https://www.php.net/manual/de/class.intldateformatter.php