Please i try to make dates to frensh and arabic in my Laravel 5.4 application, but always still in english.
this my code :
AppServiceProvider
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
/**
* The Config::get('app.locate') value: fr , ar
*/
\Carbon\Carbon::setLocale(Config::get('app.locate'));
....
}
}
View
{{ $user->created_at->formatLocalized('%A %d %B %Y') }}
The result is always:
"Thursday 05 October 2017"
-----------------------------------------------------------
I try also to use the setlocale function like this :
setlocale(LC_TIME, 'fr_FR');
setlocale(LC_TIME, 'ar_AR');
It work perfect in Frensh (fr) but not in Arabic (ar)
The result of setlocale(LC_TIME, 'fr_FR');
"Jeudi 05 octobre 2017"
The result of setlocale(LC_TIME, 'ar_AR');
"Thursday 05 October 2017"
-----------------------------------------------------------
I am a Mac OS user , so i check the packages languages
locale -a
I didn't found the ar_AR package, i try the locale-gen command but it don't work for me.
Any help please.