11-Jul-2001 08:40
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