Carbon::setLocale('fr');
$appointment = Carbon::parse('2020-10-15 14:30:00'); echo $appointment->format('l j F Y'); // Output: jeudi 15 octobre 2020In this example, the output is in French because the locale was set to French earlier in the code. If the locale had not been set, the output would be in English by default. Overall, setting the locale in Carbon is a simple but incredibly useful feature that allows you to tailor the output of dates and times to suit the needs of your users.