ID:               47451
 User updated by:  szoftos at freemail dot hu
 Reported By:      szoftos at freemail dot hu
 Status:           Bogus
 Bug Type:         Gettext related
 Operating System: FreeBSD 7.0
 PHP Version:      5.2.9RC2
 New Comment:

Yeah, but what if you would like to change your language on the fly,
like changing languages on your site? And that's just one virtualhost,
what if every virtualhost would like to use another setting of $LANG ...
?


Previous Comments:
------------------------------------------------------------------------

[2009-02-19 21:45:58] j...@php.net

If you can't use putenv() then you need to set the environment 
variables prior to running PHP / starting the webserver. No bug here.

------------------------------------------------------------------------

[2009-02-19 16:04:20] szoftos at freemail dot hu

Description:
------------
Hello,

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 for $LANG), my own translations are not useable
with gettext.

Since i use safe_mode, I'd not prefer enabling the setting of $LANG
variablewith 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.

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().



Expected result:
----------------
I expect not to use the putenv() with safe_mode=on :)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47451&edit=1

Reply via email to