I have a custom directory, eg /www/phpstuff
which is in my include_path
. Inside of this phpstuff
directory is a folder i18n
. It contains server-side level .mo
files.
Zend_Translate
lets you specify a directory in the second parameter of the constructor, I can't really do
Zend_Translate( 'gettext', 'i18n/', 'en' );
It tries to read from the directory in which this script is invoked, is there any sort of trick I can use to not have to specify /www/phpstuff/i18n
explicitly? Reason being this framework I'm working with will be used across many different platforms, and it would be easier specifying a directory in an include_path than an absolute path.
The only workaround I can come up with is manually reading the include path, splitting by the separator, checking if any of the directories are named 'gettext' and then grab the absolute path of the first directory found and set it.