How can strftime() function be used in PHP to format dates in a specific language?

When using the `strftime()` function in PHP to format dates in a specific language, you can set the locale using `setlocale()` function before calling `strftime()`. This will ensure that the date is formatted according to the specified language.

// Set the locale to a specific language
setlocale(LC_TIME, 'fr_FR');

// Format the date using strftime() in the specified language
$date = strftime('%A %d %B %Y', strtotime('2022-01-15'));

echo $date; // Output: samedi 15 janvier 2022