Gettext - finding translations for imported common module

[email protected] (Gerry Reno) Fri, 05 Nov 2010 13:01:22 -0400
Newsgroups php.i18n
Message-ID <[email protected]>
I am using PHP 5.2.4 and gettext.
I have a common module that I import (require) into other modules.
But when I do this pages (at a different level in site tree) do not show 
the translations for this module.

/siteroot
/siteroot/lib/common.php
/siteroot/lib/locale/[LANG]/LC_MESSAGES/message.po    #COMMON MODULE 
TRANSLATIONS ARE IN HERE

/siteroot/index.php             #require("lib/common.php")     #NO 
COMMON MODULE TRANSLATION OCCURS
/siteroot/locale/[LANG]/LC_MESSAGES/message.po
/siteroot/page2/index.php  #require("../lib/common.php")  #NO COMMON 
MODULE TRANSLATION OCCURS
/siteroot/page2/locale/[LANG]/LC_MESSAGES/message.po

Right now all the regular translations work fine but the imported module 
is not translated even though I have the translations for it under the 
/siteroot/lib directory.

If I put the common module translation into each po file under each 
/siteroot/pageN directory then the common module translations work but 
this requires tons of duplication.

Is there a way to bind an alternate root or domain so that gettext can 
find both the local translations and the library translations for the 
imported common modules?