note 66405 added to ref.gettext

From: Date: Sun, 21 May 2006 11:49:14 +0000
Subject: note 66405 added to ref.gettext
Groups: php.notes 
Request: Send a blank email to php-notes+get-111780@lists.php.net to get a copy of this message
If you want to use messages from multiple domains with .mo-files residing in non-standard locations remember to place a bindtextdomain()-call for each domain as "unbound" domains will be looked for in the standard location (usually "/usr/share/locale" on *nix) <?php bindtextdomain('foo','/some/dir/with/mo_files'); bindtextdomain('bar','/another/mo_file/dir'); echo dgettext('foo','Text to be translated using the foo-catalog.'); echo dgettext('bar','Text from a different catalog named bar.'); ?> If all the .mo-files you are using reside in one and the same directory, you may use the "*"-wildcard like this: <?php bindtextdomain('*','/directory/with/all/mo_files'); ?> This code was tested on PHP 5.1.4 ---- Server IP: 217.160.72.57 Probable Submitter: 217.247.106.234 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.gettext.php Edit -- http://master.php.net/note/edit/66405 Del: integrated -- http://master.php.net/note/delete/66405/integrated Del: useless -- http://master.php.net/note/delete/66405/useless Del: bad code -- http://master.php.net/note/delete/66405/bad+code Del: spam -- http://master.php.net/note/delete/66405/spam Del: non-english -- http://master.php.net/note/delete/66405/non-english Del: in docs -- http://master.php.net/note/delete/66405/in+docs Del: other reasons-- http://master.php.net/note/delete/66405 Reject -- http://master.php.net/note/reject/66405 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111780) next »