mercredi 17 juillet 2019

Carbon change language to Czech

I am trying to show date in article with $article->created_at->diffForHumans() and for now I am getting English language for example: 2 hours ago.

I would like to get the date in Czech language.

What I have tried:

By this articles: Laravel 5 Carbon global Locale, How to set language for Carbon?

In AppServicePrivider.php I set it up locale for Carbon.

`public function boot()
{
    Carbon::setLocale('cz');

}`

But it did not work. I also tried different language as German, Spanish and French all works except Czech. I am using Laravel 5.6.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire