Salut à tous,

J'ai un site qui marche très bien en local, avec fichier de traduction via POedit.

J'utilise un CMS maison en MVC. Tout passe nickel en local, mais les accents de la traduction FR ne s'affichent pas sur le serveur !

Voici mon sélecteur de langue :

//Chargement de la langue
$country = $this->_request->get('lang');
switch ( $country ) {
    case 'fr':
        $country = 'fr_FR';
        break;

    case 'en':
        $country = 'en_US';
        break;

    case 'de':
        $country = 'de_DE';
        break;

    default:
        $country = 'en_US';
        break;
}

mb_internal_encoding('UTF-8'); 
mb_http_output('UTF-8'); 
mb_http_input('UTF-8'); 
mb_regex_encoding('UTF-8'); 
// mb_internal_encoding( ENCODING ); // Sets/Gets internal character encoding
putenv( 'LC_ALL='.$country ); // Sets the value of an environment variable
setlocale( LC_ALL, $country ); // Sets locale information for date and time formatting with strftime()
bindtextdomain( 'invia', 'lang' ); // Specifies location of translation tables
textdomain( 'invia' ); // Chooses domain

Voici la page en question : https://www.invia-world.fr/landing/fr/Riderfx3

Je deviens chèvre ^^

Merci

1 réponse


RiderFx3
Auteur
Réponse acceptée

Cette ligne a résolu mon problème :

bind_textdomain_codeset('invia', 'UTF-8');