SlideShare a Scribd company logo
Internationalisation with PHP This presentation is about the “Intl” extension for PHP. By Daniel Rhodes of Warp Asylum http://www.warpasylum.co.uk
What is the “Intl” extension? A wrapper for ICU – International Components for Unicode (http://site.icu-project.org)
Let's us... Compare and sort strings
Format numbers, times and dates
Format text ... as appropriate for a given locale!
See PHP docs at  http://www.php.net/manual/en/book.intl.php
Example locale differences Here are some example locale differences that we might like to tackle: Japan's  official  calendar counts years by using emperor's era name followed by year number of that emperor's reign. 2011 is “Heisei 23” for example.
Korean language system of counting in tens of thousands. 10,000 is “one man” for example.
German alphabet with its umlauted vowels (ä, ö and ü) and eszett (ß)
How to get the extension A wrapper for ICU so you'll need that first!
Bundled extension as of PHP 5.3.0 (compile freaks will want --enable-intl)
PHP 5.2.0 onwards can get the extension from PECL
( http://www.php.net/manual/en/install.pecl.php )
Check extension presence phpinfo() will look something like:
First play and test
Functionality overview Sort and compare strings (Collator class)
Format currency amounts and other numbers (NumberFormatter class)
Locale getting, setting and information (Locale class)
Format natural language sentences (MessageFormatter class)
Format dates (IntlDateFormatter class)
And much more!  (Transliterator class not yet implemented)
Case study – sorting German More than one native way to sort!
Dictionary ,  phonebook  and  Austrian  sort orders
See  http://de.wikipedia.org/wiki/Alphabetische_Sortierung
Basically English A to Z order but with... Where do the umlauted vowels go?
Where does  eszett go? ...to answer
Case study – sorting German Let's try plain vanilla PHP first:

More Related Content

PPTX
PPTX
The Study of Language (Etymology)
PPTX
NLP_KASHK:Morphology
PPTX
Building a phonics engine for automated text guidance
PPSX
Introduction to W3C I18N Best Practices
PPT
Core Php Component Presentation
PPTX
PHP in one presentation
PPTX
The Study of Language (Etymology)
NLP_KASHK:Morphology
Building a phonics engine for automated text guidance
Introduction to W3C I18N Best Practices
Core Php Component Presentation
PHP in one presentation

Viewers also liked (20)

PDF
Threads in PHP - Presentation
PDF
"Internationalisation with PHP and Intl" source code
PDF
Data localization and translation
PPT
Php Docs
PPTX
Number Series: How To Solve Questions with Short Tricks
PPTX
Number series
PPTX
Multi language for php with gettext
ODP
Handling multibyte CSV files in PHP
PPT
The Big Documentation Extravaganza
PDF
Problem Solving with Algorithms and Data Structures
PPTX
Php oop presentation
PPTX
PHP presentation - Com 585
PDF
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
PDF
Devise | Presentation for Alpharetta PHP / Laravel Group
PDF
People code events flowchart
PPTX
PHP presentation
PPTX
Logical reasoning number series
PDF
Lean Php Presentation
ODP
Introduction of Html/css/js
Threads in PHP - Presentation
"Internationalisation with PHP and Intl" source code
Data localization and translation
Php Docs
Number Series: How To Solve Questions with Short Tricks
Number series
Multi language for php with gettext
Handling multibyte CSV files in PHP
The Big Documentation Extravaganza
Problem Solving with Algorithms and Data Structures
Php oop presentation
PHP presentation - Com 585
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Devise | Presentation for Alpharetta PHP / Laravel Group
People code events flowchart
PHP presentation
Logical reasoning number series
Lean Php Presentation
Introduction of Html/css/js
Ad

Similar to Internationalisation with PHP and Intl (20)

PPT
IMPACT Final Conference - Katrien Depuydt
PPT
02-chapter-1.ppt programming languages 10
PPT
brief intro for Programming Languages 02-chapter-1
PPT
INFO-2950-Languages-and-Grammars.ppt
PPT
NLP new words
PPT
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index
PPT
Language tools bne-5-10-2011
PPT
computer Languages and Grammars.pptx and
PPT
GROUP5-SYLLABLES
PPT
GROUP5-SYLLABLES
PPT
Os Group5
PPT
GROUP5-SYLLABLES
PPT
Os group5
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index Reprint 2020
PDF
Chapter 2: Text Operation in information stroage and retrieval
PDF
01-Introduction&Languages.pdf
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index
PDF
Perfect Explorations Artemis Alexiadou (Editor)
PDF
Perfect Explorations Artemis Alexiadou (Editor)
IMPACT Final Conference - Katrien Depuydt
02-chapter-1.ppt programming languages 10
brief intro for Programming Languages 02-chapter-1
INFO-2950-Languages-and-Grammars.ppt
NLP new words
Chinese Character Indexes Volume 1 Telegraphic Code Index
Language tools bne-5-10-2011
computer Languages and Grammars.pptx and
GROUP5-SYLLABLES
GROUP5-SYLLABLES
Os Group5
GROUP5-SYLLABLES
Os group5
Chinese Character Indexes Volume 1 Telegraphic Code Index Reprint 2020
Chapter 2: Text Operation in information stroage and retrieval
01-Introduction&Languages.pdf
Chinese Character Indexes Volume 1 Telegraphic Code Index
Perfect Explorations Artemis Alexiadou (Editor)
Perfect Explorations Artemis Alexiadou (Editor)
Ad

More from Daniel_Rhodes (7)

PDF
PhoneGap by Dissection
ODP
Hyperlocalisation or "localising everything"
ODP
PHP floating point precision
PPT
Creating a constructive comment culture
ODP
Character sets and iconv
PDF
"Character sets and iconv" PHP source code
ODP
Multibyte string handling in PHP
PhoneGap by Dissection
Hyperlocalisation or "localising everything"
PHP floating point precision
Creating a constructive comment culture
Character sets and iconv
"Character sets and iconv" PHP source code
Multibyte string handling in PHP

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
sap open course for s4hana steps from ECC to s4
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”

Internationalisation with PHP and Intl