Locale problem on subpages

I have set the following points in the configuration of my page to display the date format in German. This works fine on the start page, but on the articles the language is still English. Cache options are disabled.

'debug' => true,
    'home' => 'blog',
    'locale' => 'de_DE.utf-8',
    'date.handler' => 'strftime'

Code in my meta.php file:

<time>
    <?= $page->published()->toDate('%A, %d. %B %Y') ?>
</time>

Output home page: Montag, 25. November 2019
Output article page: Monday, 25. November 2019

I already tried options like this:

<?php
setlocale(LC_ALL, 'de_DE');
?>

Are you really calling this same snippet everywhere?

Yes. Its in a snippet called meta.php.

<?= snippet('article/meta', ['page' => $page]) ?>

Are you using the latest Kirby version?

I’m currently using 3.3.0, could updating to 3.3.1 fix the issue?

As far as I remember, there was an issue with the locale but that should have been fixed in 3.3.0 and I can’t reproduce your issue in a fresh Starterkit.

Updated to 3.3.1, same issue.

I also tried to echo <time><?= $page->published()->toDate('%A, %d. %B %Y') ?></time> in every single article template. The issue still remains.

Maybe my routes are part of the problem here?

return [
    'debug' => true,
    'home' => 'blog',
    'locale' => 'de_DE.utf-8',
    'date.handler' => 'strftime',
    'panel.install' => true,
    'routes' => [
        [
            'pattern' => '(:any).html',
            'action' => function() {
                return site()->visit('error');
            }
        ],
        [
            'pattern' => '(:any)',
            'action'  => function($uid) {
                $page = page($uid);
                if (($page) && $page->id() === 'blog') {
                    $this->next();
                }

                if(!$page) $page = page('blog/' . $uid);
                if(!$page) $page = site()->errorPage();
                return site()->visit($page);
            }
        ],
        [
            'pattern' => 'blog/(:any)',
            'action'  => function($uid) {
                go($uid);
            }
        ]
    ],
    'cache' => [
      'pages' => [
          'active' => false
      ]
  ]
];

And the locale is actually correct? And you have removed your other manual locale settings?

Yes. This is the only locale that is working.
There are no other manual locale settings. I removed the ‘setlocale’ code above.

My output from

$currentLocale = setlocale(LC_ALL, 0);
echo $currentLocale;

On the home page:

LC_CTYPE=de_DE.utf-8;
LC_NUMERIC=de_DE.utf-8;
LC_TIME=de_DE.utf-8;
LC_COLLATE=de_DE.utf-8;
LC_MONETARY=de_DE.utf-8;
LC_MESSAGES=de_DE.utf-8;
LC_PAPER=C;
LC_NAME=C;
LC_ADDRESS=C;
LC_TELEPHONE=C;
LC_MEASUREMENT=C;
LC_IDENTIFICATION=C

On the article page:

C

Now it works on all pages with this:

<?php
setlocale(LC_ALL, 'de_DE.utf-8');
?>

Strange.