Well, so far I got nothing. Dreamhost support said I should only have ASCII strings, but I have also all-ASCII characters strings remaining untranslated, the partial translation is puzzling. And the fact that it fully works in another platform also remains.
Anyway, some extra info:
the script to deal with the translation:
<?php
if (isSet($_GET["lang"])){
$locale = $_GET["lang"];
setcookie("locale", $locale, time()+60*60*24*30, "/");
}
elseif (isSet($_COOKIE['locale']))
{
$locale = $_COOKIE['locale'];}
else { $locale="pt_BR";}
putenv("LC_ALL=$locale");
putenv("LANGUAGE=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "./locale");
bind_textdomain_codeset("messages", "UTF-8");
textdomain("messages");
?>
The attached file contain .mo and .po file.
Website pages are UTF-8, as well as the .po file, which is generated by Poedit
I guess at the end it has something to do with encoding, but I'm lost.