note 114058 added to function.gettext

From: Date: Tue, 07 Jan 2014 10:23:04 +0000
Subject: note 114058 added to function.gettext
Groups: php.notes 
Request: Send a blank email to php-notes+get-198141@lists.php.net to get a copy of this message
I just wanted to say that gettext won't work on WAMP Server 2.4 / 64 Bit, see the thread I posted here: Title: Gettext doesn't work on WAMP 64 Bits http://forum.wampserver.com/read.php?2,120770,120770#msg-120770 I haven't tested with only apache 64 Bit, so, I don't know if the issue is related to apache or WAMP. Anyway, to make it work with WAMP, install the 32 Bit version of WAMP and only do this: define('LOCALE_DIR', '<root_dir_of_your_po_files>'); //ie: C:/wamp/www/your_app/locale $locale = '<your_locale>'; //ie: es_CO $domain = 'your_gettext_domain'; //ie: messages putenv('LC_ALL=' . $locale); bindtextdomain($domain, LOCALE_DIR); textdomain($domain); echo _('<your_string>'; // ie: Hello world "setlocale" nor setting the LANG, LANGUAGE, and LC_MESSAGES environment variables seems to be necessary under windows. I got it working by setting "LC_ALL" only. ---- Server IP: 194.153.94.10 Probable Submitter: 129.132.30.102 ---- Manual Page -- http://php.net/manual/en/function.gettext.php Edit -- https://master.php.net/note/edit/114058 Del: integrated -- https://master.php.net/note/delete/114058/integrated Del: useless -- https://master.php.net/note/delete/114058/useless Del: bad code -- https://master.php.net/note/delete/114058/bad+code Del: spam -- https://master.php.net/note/delete/114058/spam Del: non-english -- https://master.php.net/note/delete/114058/non-english Del: in docs -- https://master.php.net/note/delete/114058/in+docs Del: other reasons-- https://master.php.net/note/delete/114058 Reject -- https://master.php.net/note/reject/114058 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198141) next »