Stas Malyshev has written a good article over at Zend Developer Zone about the new intl – Internalization extension in PHP 5.3. Internationalization has been a major problem with web developers when developing sites which have to support multiple languages. The new extension eases the developer’s work drastically. Stas mentions in the article that the following modules have been implemented in the Intl extension:
- Locale — deals with breaking locale data into components, assembling a locale string from components and displaying the names of countries, languages etc in a specified locale.
- Collator — a means of comparing and sorting strings according to local rules.
- Number formatter — allows you to format numbers in a variety of ways, and to parse textual representations of numbers.
- Date formatter — allows you to format dates and to parse textual representations of dates.
- Message formatter — allows you to compose messages from parameterized strings while formatting the data inside according to local rules and allowing choices dependent on the actual parameter value.
- Normalizer — a means of bringing a Unicode string to a standard, unambiguous representation.
- Grapheme module – handles parsing a string into a set of graphemes.
- IDN – handles internationalized domain names format
Read Stas’ article to learn how to use the new features this extension provides to make your website Internationalization ready.
If you’re using PHP5.2, you’re in luck since there is a PECL package which should run on PHP 5.2.4 and newer over at: http://pecl.php.net/package/intl
Image via Wikipedia