Installing php5-intl for easier internationalisation of PHP scripts

If you are just doing your own thing you will probably never run into this. But if you are doing things which need to be compatible with languages that seem to have rather funny letters looking like this = äöü … then this is for you.

To get the basic package installed on Debian simply:

aptitude install php5-intl

Then get it loaded and confugred the way you need it. Easiest is pack it all in one file.

nano /etc/php5/mods-available/intl.ini

This is what mine says, mind you that this is for the gmeran umlauts.

; configuration for php Internationalisation module
; priority=20
extension=intl.so

intl.default_locale = de_utf8

intl.error_level = E_WARNING

A brief explanation to what parameters can be set can be found here:

http://php.net/manual/en/intl.configuration.php

In terms of how the language code is set and what it entails, this is for german, the others are just a couple of clicks away:

http://demo.icu-project.org/icu-bin/locexp?d_=de&_=de

I am not sure where in the docs I read it, but Intl will refer to the ICU standards in terms of language setting.

This works of course on windows as well. Just use your editor of choice instead of nano.

🙂