How do I customize the following code for the date display (in a blog) for a multilingual (de/en) website?
<?= $page->date()->toDate(new IntlDateFormatter("en_DE", IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Europe/Berlin')); ?>
"de_DE"
would need to be replaced with the following code:
<?php e($kirby->languages()->isNotEmpty(), $kirby->language()->code()) ?>
And how do I integrate the timezone 'Europe/Berlin'
in other languages?
I can’t insert additional PHP code into an existing PHP code:
<?= $page->date()->toDate(new IntlDateFormatter(" ' . e($kirby->languages()->isNotEmpty(), $kirby->language()->code()) . ' ", IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Europe/Berlin')); ?>
… that does not work:
Cannot access protected property Kirby\Cms\App::$languages