note 13949 added to ref.gettext.php

From: Date: Wed, 11 Jul 2001 09:40:20 +0000
Subject: note 13949 added to ref.gettext.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15212@lists.php.net to get a copy of this message
It is probably obvious to many of you, but I thought it was worth mentioning that the domain is the name of the .mo files that contain the string catalogue (without the extension). so if you have a catalogue myPage.mo for each page in './locale/lg/LC_MESSAGE' and some generic catalogues (e.g. errorMsg.mo) in '/global/locale/lg/LC_MESSAGE', you can do bindTextDomain("$myPage", './locale'); bindTextDomain('errorMsg','/global/locale' ); textDomain('myPage'); print(getText('Welcome')); /.../ if($err)printf(dGetText('errorMsg','you have an error here')); Ivan http://www.php.net/manual/en/ref.gettext.php

« previous php.notes (#15212) next »