Sunday, August 20, 2017

how to translate using gettext on xampp server on OS X El Capitan version 10.11.6

Leave a Comment

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?):

  1. Install the latest version of Xcode Command Line Tools. (by entering the following command in the terminal: xcode-select –install)
  2. Download the latest version of gettext and extract it to /Source or whatever you like.
  3. In the /Source director enter in the terminal: ./Configure, make, and sudo make install
  4. Download the PHP version that matches your system and extract it
  5. Change in the PHP source to the directory ext/gettext and enter the following commands: 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/modules
  6. Create a local extension folder: mkdir -p /usr/local/macoperator/lib/php/extensions and copy the newly created gettext.so extension to this folder
  7. 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

  8. Finally, make sure apache is restarted, by issuing:

    server-apachectl graceful

  9. Checking `phpinfo(), do you see:

    GetText Support enabled

Alternatively, you could try install PHP via Homebrew.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment