From: James E. F. <jf...@ac...> - 2002-02-21 16:41:24
|
In order for gettext to work: 1) safe_mode must Off otherwise environment variables cannot be set 2) gettext must be compiled into PHP *or* PHP must be able to dynamically load the extension You can test the above requirements with this PHP code: <?php echo ("safe mode: " . (ini_get("safe_mode") ? "On" : "Off") . "<br>"); if (!extension_loaded("gettext")) { echo("gettext: not loaded ... trying to load<br>"); dl("gettext.so"); // maybe just "gettext" no "gettext.so" } echo ("gettext: " . (extension_loaded("gettext") ? "loaded" : "not loaded") . "<br>"); ?> // You may also want to include: <?php echo("browser wants: " . $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'] . "<br>"); ?> phpESP will use the first languge from the "HTTP_ACCEPT_LANGUAGE" string that it finds in the locale path. -James On Thu, 21 Feb 2002, Richard M. Pavonarius wrote: > Me again. > > I'm trying to get "You are missing the following required questions:" to > show up in Japanese. Here's what I did: > > Changed default lang from en to ja in phpESP.ini > copied /locale/en directory to /local/ja > > in locale/ja/LC_MESSAGES/message.po > > Changed header: > > "Project-Id-Version: phpESP-1.3\n" > "POT-Creation-Date: 2001-11-19 21:15-0500\n" > "PO-Revision-Date: 2001-11-19 21:15-0500\n" > "Last-Translator: Richard M. Pavonarius <ri...@pa...>\n" > "Language-Team: ja <ri...@pa...>\n" > "MIME-Version: 1.0\n" > "Content-Type: text/plain\n" > "Content-Transfer-Encoding: euc-jp\n" > > > Added translations like this: > > #: phpESP/admin/include/lib/espresponse.inc:55 > msgid "You are missing the following required questions:" > msgstr "$B2<5-$N9`L\$rF~NO$7$F$/$@$5$$!'(B" > > I didn't translate everything, only a few. > > Created binary messages.mo: > > #msgfmt messages.po -v -o messages.mo > 4 translated messages, 252 untranslated messages. > > Changed Lang pref in my browser to ja just for kicks. > > When I preview a survey being edited or test a survey, the string is still > in English. > > Rich |