OS X so far does not include gettext (since my first attempt from 10.4). You'll have to build it yourself. I followed the process below and worked under 10.6 (taken from an Apple forum discussion thread). It's still working now in 10.7. Note that this is to install gettext module, not php_gettext. Though they function pretty much the some way, initialization supposedly is different. Remember though to swap the link for the right PHP version. I think 10.7 comes with PHP 5.3.6. You'll need to search for it.
Try this as root (or issue sudo -s before):
mkdir -p /SourceCache
cd /SourceCache
curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
tar xzf gettext-0.17.tar.gz
cd gettext-0.17
MACOSXDEPLOYMENTTARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bindatload" ./configure
make
make install
cd /SourceCache
curl -O http://www.opensource.apple.com/source/apachemod_php/apache_modphp-53/php-5.3.0.tar.bz2
tar xjf php-5.3.0.tar.bz2
cd /SourceCache/php-5.3.0/ext/gettext
phpize
MACOSXDEPLOYMENTTARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bindatload" ./configure
make
make install
When done, edit/create /etc/php.ini and add:
extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so
next issue:
sudo apachectl graceful
Good luck!