I have a problem with gettext where if a user visit my website in spanish and the translation is not available for this language, the identifier is displayed instead of the english translation ?
Is there a way to avoid this ?
Here is some revelant part of my code:
$lc = 'es_ES.utf8';
putenv('LC_ALL='.$lc);
setlocale(LC_ALL, $lc);
$languageFileName = 'default';
bindtextdomain($languageFileName, ROOT_PATH.'/locale');
bind_textdomain_codeset($languageFileName, 'UTF-8');
textdomain($languageFileName);
And here is my arborescence:
-en_US
--LC_MESSAGES
---default.mo
---default.po
-es_ES
--LC_MESSAGES
---default.mo
---default.po
-fr_FR
--LC_MESSAGES
---default.mo
---default.po
Note that I'm using PHP 5.4 and my system is in french.