Strftime localization issue

de.php:

<?php

return [
    'code' => 'de',
    'default' => true,
    'direction' => 'ltr',
    'locale' => [
        'de_DE'
    ],
    'name' => 'Deutsch',
    'translations' => [

    ],
    'url' => NULL
];

en.php:

<?php

return [
    'code' => 'en',
    'default' => false,
    'direction' => 'ltr',
    'locale' => [
        'en_US'
    ],
    'name' => 'Englisch',
    'translations' => [

    ],
    'url' => NULL
];

Ok, what if you remove the locale from config, and then try some of the variations from above in those language files.

Please do not use quotes for code, but three backticks on a separate line before and after a code block, thanks.

These 2 Files are located in the language folder (subfolder of site), if i remove them the site does not work. I tried serveral variations in the config.php but without any changes.

So, should i make some changes in the locale of en.php and de.php?

Ok, I asked you to remove the locale setting from the config.php and try some of the variations of the locale settings I suggested in an earlier post in the language files. Do not remove the locale setting from the language configuration files.

I’ve tried this yesteraday already … without any change of the problem :frowning:

In the language files? I thought you had tested this only in the config file.

I’m running out of ideas. May I suggest you contact your hosting provider?

First I’ve tested it in the config file sure, but yesterday I remove the locale in the config.php and edit the locale in the de.php only

Let’s make this a little bit strange …

In the test environment at 1und1 IONOS I access to the webspace with ssh and execute the “locale -a”. There i get huge mount of installed locales, e.g. de_DE, de_DE.utf8 etc. I’ve changed the locale in the de.php to this values but the problem is still the same.

Could the problem be in calling the date with '%A, %Ex'?

I couldn’t find what %Ex is, but apart from that, when using strftime, you have to use these format parameters.

So, I made two new php Files:

<?php
echo strftime("%A, %Ex");
setlocale (LC_TIME, "de_DE");
echo " in deutsch: ".strftime("%A, %Ex");
?>

and

<?php
echo strftime("%A, %Ex");
setlocale (LC_TIME, "en_US");
echo " in english: ".strftime("%A, %Ex");
?>

They work … so my Hoster don’t understand the source code :frowning:

Has anybody an idea how can i rewrite the code, so that will work?

They work on your host? Or locally?

Both

Have you tried to set the individual locales in your language files? https://getkirby.com/docs/reference/system/options/locale#detailed-settings