In multilingual websites, it is important to display content in the appropriate language and context – especially when it comes to localized content for international audiences. One often overlooked aspect is the date. For example, when the day of the week is displayed, PHP outputs it in English by default, regardless of the language of the page. This not only affects the user experience, but can also be relevant for SEO.

In this article, we show how to use an EEL helper in Neos CMS (version 8.3 and later) to correctly localize the date according to the language dimension – an important building block for technically clean, multilingual websites, such as those required for data-driven performance marketing campaigns.

Problem: Incorrect Language for Dates

Even when a page is loaded in German, PHP's format() method returns English weekday names when using the format string 'l d.m.Y' (e.g. “Friday 02.08.2025”). Localization therefore needs to be handled explicitly in Neos – especially when content is optimized for paid search, retargeting, or organic visibility across different language regions.

Solution: Language-Dependent Formatting with an EEL Helper

The following PHP helper checks the current language and formats the date accordingly. The language is passed directly as a parameter – ideal for technical SEO and custom tracking setups in multilingual environments:

<?php
namespace Vendor\Package\Eel;

use Neos\Eel\ProtectedContextAwareInterface;

class DateHelper implements ProtectedContextAwareInterface
{
    public function format(
        $date,
        string $format = 'd.m.Y',
        string $timeZone = 'Europe/Berlin',
        string $language = 'de' // Default language
    ): string {
        if (!$date instanceof \DateTimeInterface) {
            return '';
        }

        $dateInUtc = new \DateTimeImmutable($date->format('Y-m-d H:i:s'), new \DateTimeZone('UTC'));
        $converted = $dateInUtc->setTimezone(new \DateTimeZone($timeZone));

        // Localization via locale
        $formatter = new \IntlDateFormatter(
            $language,
            \IntlDateFormatter::FULL,
            \IntlDateFormatter::NONE,
            $timeZone,
            \IntlDateFormatter::GREGORIAN,
            $format
        );

        return $formatter->format($converted);
    }

    public function allowsCallOfMethod($methodName): bool
    {
        return true;
    }

    public function allowsProperty($propertyName): bool
    {
        return true;
    }
}

Fusion Integration: Passing the Current Language

In the Fusion template, we pass the currently active language dimension – for example:

{DateHelper.format(eventDate.properties.startDateTime, 'EEEE dd.MM.yyyy', 'Europe/Berlin', props.languageCode)}

Important: For props.languageCode to be available, it must be set in the Fusion context:

languageCode = ${Array.first(q(site).get(0).context.dimensions.language)}

This allows Neos to access the current content dimension “Language” – for example, de or en.

Result

For German: Freitag 02.08.2025
For English: Friday 02.08.2025

Conclusion

Using the correct language setting for dates is a small but important detail in multilingual web projects. The helper shown above, combined with dynamic language handling, provides an elegant and robust solution – without the need for manual workarounds.

Such details are essential when a content strategy needs to be scaled across multiple markets – for example, for landing pages in paid advertising, localized event pages, or conversion-oriented microsites.

Do you have questions about technical implementation in Neos CMS, localization, or integration into performance-oriented web projects? Get in touch with us – we’ll be happy to help.