From:             pprocacci at datapipe dot com
Operating system: FreeBSD 6.2
PHP version:      5.2.2
PHP Bug Type:     *General Issues
Bug description:  Gettext not translating strings

Description:
------------
Translation of strings are not working.  A 'truss' of the process shows a
`stat` of the locale directory that I want (i.e. /DOCROOT/locale) when
calling bindtextdomain, but no further files/directories in that root are
ever opened for reading to further process the calls that I am making,
hence this bug report.  Truss/strace available upon request.

Example Locale Dir:
-------------------
$ ls -l /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.{mo,po}
-rwxrwxrwx  1 user  group    5729 May  9 19:51
/DOCROOT/locale/zh_CN/LC_MESSAGES/messages.mo*
-rwxrwxrwx  1 user  group  110013 May  9 19:51
/DOCROOT/locale/zh_CN/LC_MESSAGES/messages.po*


Operating System:
------------------------------
$ uname -a
FreeBSD mysite.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 03:47:08
UTC 2007     [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386


Installed Extensions:
---------------------------------------
$ pkg_info | fgrep php5
php5-5.2.1_3
php5-bz2-5.2.1_3
php5-ctype-5.2.1_3
php5-dom-5.2.1_3
php5-ftp-5.2.1_3
php5-gd-5.2.1_3
php5-gettext-5.2.1_3
php5-iconv-5.2.1_3
php5-mbstring-5.2.1_3
php5-mcrypt-5.2.1_3
php5-mysql-5.2.1_3
php5-openssl-5.2.1_3
php5-pcre-5.2.1_5
php5-pdo-5.2.1_3
php5-pdo_sqlite-5.2.1_3
php5-posix-5.2.1_3
php5-session-5.2.1_3
php5-simplexml-5.2.1_3
php5-spl-5.2.1_3
php5-sqlite-5.2.1_3
php5-tokenizer-5.2.1_3
php5-xml-5.2.1_3
php5-xmlreader-5.2.1_3
php5-xmlwriter-5.2.1_3
php5-zlib-5.2.1_3

Reproduce code:
---------------
<?php

setlocale(LC_MESSAGES, 'zh_CN.UTF-8');
textdomain("messages");
bindtextdomain("messages", "/DOCROOT/locale");
echo _("Hello");

?>

Expected result:
----------------
Weird non-English Characters.

Actual result:
--------------
A string that was passed to the function.

-- 
Edit bug report at http://bugs.php.net/?id=41391&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41391&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41391&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41391&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41391&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41391&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41391&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41391&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41391&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41391&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41391&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41391&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41391&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41391&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41391&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41391&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41391&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41391&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41391&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41391&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41391&r=mysqlcfg

Reply via email to