In a project of my company there is a website available in 6 languages. The site sends some emails to customers/members. Every phrase/word is stored in database and all work well in the website. Our main problem appears in emails.
In each email there are daily reports. We use set_locale() to define each language and "show" the day names (months also) to the proper selected language. This works ok.
In some cases there are more than one emails to be send (in 2 different languages) - here we have problem. Every info in email appears correct - texts/translations from database. Day names (and month also) appear only in the first language in both emails. So, if the first email was in german and the second in french, the french email will have everything in french except the day names that will be in german (even though that we execute set_locale again before sending the second email)
so the actual sciprt will look something like:
setlocale(LC_ALL, $german);
// send german email
setlocale(LC_ALL, $french);
// send french email
Each language locale look like: "fr_FR.UTF8"
Why is that? Is this some set_locale bad behavior? How can we prevent/fix this? Thank you for any insight/tips
edit: server runs apache 2 and php4 if you need this info