Note: You are currently viewing documentation for Moodle 3.9. Up-to-date documentation for the latest stable version of Moodle may be available here: admin/environment/php extension/intl.

admin/environment/php extension/intl: Difference between revisions

From MoodleDocs
 
(→‎Other operating systems: CentOS 8.0 uses dnf instead of yum, definitely not php5-intl for Debian/Ubuntu)
 
(15 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Environment}}
The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.
The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.


To enable this extension add the following line to your php.ini file:
The Intl extension is required in Moodle 3.4 onwards.


extension=php_intl.dll
==MS Windows==


To enable this extension add the following line to your php.ini file usually found in /php:
<code>
extension= php_intl.dll
</code>


And then set the ''intl.default_locale'' and ''intl.error_level'' directives in your php.ini file.
And then set the ''intl.default_locale'' and ''intl.error_level'' directives in your php.ini file.
''intl.error_level'' is optional.


<code>
<code>
Line 17: Line 21:
intl.error_level = E_WARNING
intl.error_level = E_WARNING
</code>
</code>
The ''intl.error_level'' directive is optional.
In a WAMP installation it may be required to add the php path to the the system PATH so that the module4 could uploaded properly (see http://forum.wampserver.com/read.php?2,80704,82499 for a couple of other approaches).
==Other operating systems==
Use system package manager or specify compilation flag.
*Debian 5.0 (& Ubuntu) use: '''apt-get install php-intl'''.
*CentOS 8.0 (& Red Hat) use: '''dnf install php-intl'''. CentOS 7.0 (& RedHat) use: '''yum install php-intl'''. The package name may be slightly different depending on the repository used for PHP packages, e.g. '''php74-intl'''.


==See also==
==See also==


[http://www.php.net/manual/en/intro.intl.php INTL Introduction]
*[http://www.php.net/manual/en/intro.intl.php INTL Introduction]
*[http://www.php.net/manual/en/book.intl.php PHP Internationalization Functions]
*[https://docs.moodle.org/en/Table_of_locales Table of locales] lists the locales that you can use.


[http://www.php.net/manual/en/book.intl.php PHP Internationalization Functions]
[[Category:Environment|PHP]]


[https://docs.moodle.org/en/Table_of_locales Table of locales] lists the locales that you can use.
[[fr:admin/environment/php extension/intl]]
[[es:admin/environment/php extension/intl]]

Latest revision as of 09:09, 17 September 2020

The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.

The Intl extension is required in Moodle 3.4 onwards.

MS Windows

To enable this extension add the following line to your php.ini file usually found in /php:

extension= php_intl.dll

And then set the intl.default_locale and intl.error_level directives in your php.ini file.

[intl]

intl.default_locale = en_utf8

intl.error_level = E_WARNING

The intl.error_level directive is optional.

In a WAMP installation it may be required to add the php path to the the system PATH so that the module4 could uploaded properly (see http://forum.wampserver.com/read.php?2,80704,82499 for a couple of other approaches).

Other operating systems

Use system package manager or specify compilation flag.

  • Debian 5.0 (& Ubuntu) use: apt-get install php-intl.
  • CentOS 8.0 (& Red Hat) use: dnf install php-intl. CentOS 7.0 (& RedHat) use: yum install php-intl. The package name may be slightly different depending on the repository used for PHP packages, e.g. php74-intl.

See also