ID: 47479 Comment by: szoftos at freemail dot hu Reported By: szoftos at freemail dot hu Status: Open Bug Type: Gettext related Operating System: FreeBSD 7.0 PHP Version: 5.2.9RC3 New Comment:
umm, sorry, i was mistyped. I was told to set it at _startup_, but that's not good enough. I have to set it runtime. Previous Comments: ------------------------------------------------------------------------ [2009-02-23 13:11:41] szoftos at freemail dot hu Description: ------------ Okay, i am posting this again, beacuse of my other bug was marked bogus, and i still think it's not: on BSD systems, setlocale itself is not usable for gettext without putenv(). If I don't use putenv() with setlocale() (which is not enabled by default in safe_mode=on for $LANG), my own translations are not useable with gettext. Since i use safe_mode, I'd not prefer enabling the setting of $LANG variable with putenv(). What I've seen during php ktracing, is that setlocale() only reads the original language settings from /usr/share/locale/*, but my own translations are not looked up. Is there any way to fix that functionality? Maybe it's more BSD related than I think. KEEP IN MIND: If you would like to build a multi-langual site with gettext, and the language have to be switched on-the-fly, you HAVE TO set te $LANG variable on each run. I was told to set it at runtime, but this is NOT an ELIGIBLE solution. Please don't mark it bogus, because this is a real problem with safe_mode=on. Reproduce code: --------------- You can simply try the gettext module's own tests to test it in BSD. They all will fail, because those tests aren't usint putenv(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47479&edit=1