Translation

Fatal error: Call to undefined function bindtextdomain()

By

in

Fatal error: Call to undefined function bindtextdomain() in [...]

This error might be caused by a missing GetText extension. GetText is a widely-used internationalization and localization (i18n/l10n) system that provides tools for translating software messages into different languages.

To solve the error, you have to enable the extension in your php.ini. For this, open your php.ini and uncomment (or add) the following line:

extension=php_gettext.dll

If the extension is not installed yet, this is how to install GetText on macOS (for PHP 7.0):

sudo port install php70-gettext

Or for any other PHP version use:

sudo port install php80-gettext
sudo port install php81-gettext
sudo port install php82-gettext
sudo port install php83-gettext

You can check for available versions on the MacPorts website.

Afterwards, do not forget to restart Apache:

sudo port unload apache2
sudo port load apache2

Photo by Markus Winkler on Unsplash



Comments

3 responses to “Fatal error: Call to undefined function bindtextdomain()”

  1. Good Day,

    I got the error stated above.
    can you provide a step by step instruction to either activate or install gettext?

    I am running PHP 7.3

    1. Mathias Lipowski Avatar
      Mathias Lipowski

      Which operating system are you using? For macOS you can use the install command from above.

    2. Hi I am using windows 10 getting error how to solve ?

Leave a Reply

Your email address will not be published. Required fields are marked *