From:             szoftos at freemail dot hu
Operating system: FreeBSD 7.0
PHP version:      5.2.9RC3
PHP Bug Type:     Gettext related
Bug description:  Again: setlocale() ignores translation setting

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 bug report at http://bugs.php.net/?id=47479&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47479&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47479&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47479&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47479&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47479&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47479&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47479&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47479&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47479&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47479&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47479&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47479&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47479&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47479&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47479&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47479&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47479&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47479&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47479&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47479&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47479&r=mysqlcfg

Reply via email to