Reputation: 1741
I am working on a website that is using gettext for translation. The website is translating properly on servers of other machines but not on mine (OS X El Capitan version 10.11.6). I have follow the following tutorial to install gettext on mac:
link to the tutorial I followed
After the installation, gettext is not still working. Can someone help me here??
Upvotes: 6
Views: 386
Reputation: 18980
I followed pretty much the same instructions on Sierra (maybe you have messed up at some point?):
xcode-select –install
)./Configure
, make
, and sudo make install
phpize
, ./Configure
, make
, and sudo make install
(each on a separate line).
At this point you might get an SIP error, because the install has no access to /usr/libexec/php/extensions. However, the extension was created in the PHP source folder ext/gettext/modulesmkdir -p /usr/local/macoperator/lib/php/extensions
and copy the newly created gettext.so extension to this folderReference the local extension folder in your /etc/php.ini. Just add the following line at the end:
extension_dir = "/usr/local/macoperator/lib/php/extensions" [gettext] extension=gettext.so
Finally, make sure apache is restarted, by issuing: server-apachectl graceful
Checking phpinfo()
, do you see:
GetText Support enabled
Alternatively, you could try install PHP via Homebrew.
Upvotes: 1