Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MichielElswood's avatar

Localization on Localhost

Hi all!

I'm developing a CMS in Laravel. I want the localization to be Dutch. In app/config.php I changed the settings. The problem is however, this:

In my controller I format the 'created_at' to Dutch formatting.

return $foo->created_at->formatLocalized('%e %B %Y');

Instead of 8 januari 2020 (today's date), it says 8 January 2020. So I'm guessing my localhost is overwriting these values.

Is there a package so localhost shows me the Dutch names of the months? Or even in Laravel?

0 likes
1 reply
newbie360's avatar

you can set the Carbon locale on run time

project-folder/app/Providers/AppServiceProvider.php

public function boot()
{
    \Carbon\Carbon::setLocale('zh_TW');
}

all the locale files is in

project-folder/vendor/nesbot/carbon/src/Carbon/Lang

Please or to participate in this conversation.