How can one ensure that dates are displayed correctly in multiple languages using PHP?

When displaying dates in multiple languages using PHP, it is important to set the correct locale to ensure the dates are displayed in the desired language format. This can be achieved by using the `setlocale` function in PHP to specify the desired language and region. Additionally, the `strftime` function can be used to format the date according to the specified locale.

// Set the desired locale for date formatting
setlocale(LC_TIME, 'fr_FR.utf8');

// Get the current date and format it according to the specified locale
$date = strftime('%A %d %B %Y', time());

// Display the formatted date
echo $date;