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??
1 Answers
Answers 1
I followed pretty much the same instructions on Sierra (maybe you have messed up at some point?):
- Install the latest version of Xcode Command Line Tools. (by entering the following command in the terminal:
xcode-select –install
) - Download the latest version of gettext and extract it to /Source or whatever you like.
- In the /Source director enter in the terminal:
./Configure
,make
, andsudo make install
- Download the PHP version that matches your system and extract it
- Change in the PHP source to the directory ext/gettext and enter the following commands:
phpize
,./Configure
,make
, andsudo 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/modules - Create a local extension folder:
mkdir -p /usr/local/macoperator/lib/php/extensions
and copy the newly created gettext.so extension to this folder Reference 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.
0 comments:
Post a Comment