title: How to install gettext on MacOS X
body: <p>How do I install gettext on mac?</p>
  
  <p>I get this error on one of my php pages:</p>
  
  <pre><code>Fatal error: Call to undefined function bindtextdomain()
  </code></pre>
  
  <p>and it's because I don't have gettext installed.</p>
  
  <p>I can't find good instructions on how to install it. I've tried using:</p>
  
  <pre><code>brew install gettext
  </code></pre>
  
  <p>and it puts some files here:</p>
  
  <p>/usr/local/Cellar/gettext/0.18.2</p>
  
  <p>but I don't know what to do with that.</p>
  
  <p><strong>Update: Instead of trying to use homebrew, now I tried this method unsucessfully using wget:</strong></p>
  
  <p>Download with wget</p>
  
  <pre><code>cd ~/Downloads
  wget http://ftp.gnu.org/gnu/gettext/gettext-0.18.2.tar.gz
  tar -zxvf gettext-0.18.2.tar.gz
  cd gettext-0.18.2
  ./configure
  make
  </code></pre>
  
  <p>make check is optional to run self-tests</p>
  
  <pre><code>make check
  </code></pre>
  
  <p>Errors I got:</p>
  
  <p>make[3]: *** [check-TESTS] Error 1</p>
  
  <p>make[2]: *** [check-am] Error 2</p>
  
  <p>make[1]: *** [check-recursive] Error 1</p>
  
  <pre><code>sudo make install
  </code></pre>
  
  <p>That installs it here:
  /usr/local/share/gettext</p>
  
  <p>And the documentation here:
  /usr/local/share/doc/gettext</p>
  
  <p>but how do I make my php pages be able to use gettext and the bindtextdomain() function?</p>