Open In App

How to Install PHP intl extension in Ubuntu?

Improve
Improve
Like Article
Like
Save
Share
Report

The Internationalisation (Intl) extension is a wrapper for the ICU library, a collection of C/C++ and Java libraries that provide Unicode and Globalisation support for software applications. It tends to closely follow ICU APIs so that people having experience working with ICU in either C/C++ or Java could easily use the PHP API.

Intl consists of several modules, each of them exposes the corresponding ICU API:

  • Collator: Provides string comparison capability with support for appropriate locale-sensitive sort orderings.
  • Number Formatter: Allows to display number according to the localized format or given pattern or set of rules, and to parse strings into numbers.
  • Message Formatter: Allows to create messages incorporating data (such as numbers or dates) formatted according to given pattern and locale rules, and parse messages extracting data from them. It can handle plurals, locale-aware numbers, currencies, conditions, and much more.
  • Normalizer: Provides a function to transform the text into one of the Unicode normalization forms, and provides a routine to test if a given string is already normalized.
  • Calendar: Provides a class that could be used for locale-aware calendar operations and getting various information such as timezone for locale chosen, the first day of the week, or if it’s daylight saving time now.
  • Timezone: Provides a wrapper around the “Olson” database which has information about all the timezones around the world.
  • Date formatter: Allows to display date and time according to the localized format or given pattern or set of rules, and to parse strings into date and time.
  • Transliterator: Allows getting Latin representation of strings in various languages.

Verify the installation of php-intl on Ubuntu

Open terminal on your ubuntu system and type the following command

dpkg –list | grep php-intl

If you get no result like my output, then follow the steps below to install php-intl.

Step 1: Update your system packages.

sudo apt-get update -y

Step 2: Run the command for installing php-intl

sudo apt-get install -y php-intl

Again verify the installation

Your system is installed with php-intl.


Last Updated : 06 Jan, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads