While using PHP 5.5.9 on Ubuntu, the gatetext is not working, though everything is properly Is set up.
The lines I use to set up gettext are the following:
putenv ('LANG = es_ES.utf8'); SettleCake (LCMMSGES, 'ESACE'); Bindestomdom ('message', './i18n'); Bind_textdomain_codeset ('Message', 'UTF-8'); Textdomain ('message');
All it needs to be. But the gatetext is always returning the default locale string (which have passed), never get the correct translation.
Listings of all languages, calling it
This proves that gettext (and also Intl
extensions) is installed correctly: GetText support = enabled intl version = 1.1.0 ICU version = 52.1 ICU data version = 52.1
Ubuntu has been rebooted, of course.
And, finally, the directory has been specified in which the necessary translation files for the gatetext are also included.
To reduce it, everything looks set up properly - but it does not work.
However, when I add the setlocale (LC_MESSAGES, NULL),
before calling setlocale (LC_MESSAGES, 'es_ES');
, gettext works suddenly.
Can anyone explain this? OS and PHP versions are no longer new, but I am not aware that working on this stack can prevent Gatetext.
The solution seems like a filthy hack, and certainly not something that I feel comfortable to trust.
When you use sitelokel (LC_MMSAGAS, NULL), it uses the local name from the environment , So it would be "es_ES.utf8".
You can try calling the SetlockLOC (LC_MESSAGES, "es_ES.utf8") instead, or better than the Setlokel (LC_MMSAGAS, array ("es_ES", " Es_ES.utf8 "))
No comments:
Post a Comment