How To Install php-php-gettext on Kali Linux

In this tutorial we learn how to install php-php-gettext on Kali Linux. php-php-gettext is read gettext MO files directly, without requiring anything other than PHP

Introduction

In this tutorial we learn how to install php-php-gettext on Kali Linux.

What is php-php-gettext

php-php-gettext is:

The GNU gettext library is a widely used localization library, but in order to use it with the PHP language, the system has to support the desired locale, and library itself must be installed.

Since this is not always the case, PHP-gettext has been developed to be able to read gettext MO files directly, without requiring anything other than PHP.

Currently, it’s usable if you develop most of the infrastructure for choosing language on your own, because it’s possible to use both gettext() and ngettext() calls. In the near future, it should also be fully compatible drop-in replacement for all of gettext functionality written in PHP.

There are three methods to install php-php-gettext on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-php-gettext Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install php-php-gettext using apt-get by running the following command:

sudo apt-get -y install php-php-gettext

Install php-php-gettext Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-php-gettext using apt by running the following command:

sudo apt -y install php-php-gettext

Install php-php-gettext Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-php-gettext using aptitude by running the following command:

sudo aptitude -y install php-php-gettext

How To Uninstall php-php-gettext on Kali Linux

To uninstall only the php-php-gettext package we can use the following command:

sudo apt-get remove php-php-gettext

Uninstall php-php-gettext And Its Dependencies

To uninstall php-php-gettext and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove php-php-gettext

Remove php-php-gettext Configurations and Data

To remove php-php-gettext configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge php-php-gettext

Remove php-php-gettext configuration, data, and all of its dependencies

We can use the following command to remove php-php-gettext configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-php-gettext

Dependencies

php-php-gettext have the following dependencies:

References

Summary

In this tutorial we learn how to install php-php-gettext package on Kali Linux using different package management tools: apt, apt-get and aptitude.