Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 960
Kamga Simo Junior Avatar asked Feb 10 '17 04:02

Kamga Simo Junior


1 Answers

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.

like image 133
wp78de Avatar answered Oct 27 '22 03:10

wp78de