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

Viewers also liked (20)

PDF
Threads in PHP - Presentation
appserver.io
 
PDF
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
PDF
Data localization and translation
Motti Danino
 
PPT
Php Docs
Pablo Viquez
 
PPTX
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
 
PPTX
Number series
Are Lavanya
 
PPTX
Multi language for php with gettext
Binh Quan Duc
 
ODP
Handling multibyte CSV files in PHP
Daniel_Rhodes
 
PPT
The Big Documentation Extravaganza
Stephan Schmidt
 
PDF
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
 
PPTX
Php oop presentation
Mutinda Boniface
 
PPTX
PHP presentation - Com 585
jstout007
 
PDF
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
PDF
Devise | Presentation for Alpharetta PHP / Laravel Group
Gary Williams
 
PDF
People code events flowchart
Satish Ap
 
PPTX
PHP presentation
Helen Pitlick
 
PPTX
Logical reasoning number series
Praveesh Palakeel
 
PDF
Lean Php Presentation
Alan Pinstein
 
ODP
Introduction of Html/css/js
Knoldus Inc.
 
Threads in PHP - Presentation
appserver.io
 
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
Data localization and translation
Motti Danino
 
Php Docs
Pablo Viquez
 
Number Series: How To Solve Questions with Short Tricks
Entrance Exam Info
 
Number series
Are Lavanya
 
Multi language for php with gettext
Binh Quan Duc
 
Handling multibyte CSV files in PHP
Daniel_Rhodes
 
The Big Documentation Extravaganza
Stephan Schmidt
 
Problem Solving with Algorithms and Data Structures
Yi-Lung Tsai
 
Php oop presentation
Mutinda Boniface
 
PHP presentation - Com 585
jstout007
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
Devise | Presentation for Alpharetta PHP / Laravel Group
Gary Williams
 
People code events flowchart
Satish Ap
 
PHP presentation
Helen Pitlick
 
Logical reasoning number series
Praveesh Palakeel
 
Lean Php Presentation
Alan Pinstein
 
Introduction of Html/css/js
Knoldus Inc.
 

Similar to Internationalisation with PHP and Intl (20)

PPT
IMPACT Final Conference - Katrien Depuydt
IMPACT Centre of Competence
 
PPT
02-chapter-1.ppt programming languages 10
kavitamittal18
 
PPT
brief intro for Programming Languages 02-chapter-1
SantiagoCavanagh5
 
PPT
INFO-2950-Languages-and-Grammars.ppt
LamhotNaibaho3
 
PPT
NLP new words
guest9fc47a
 
PPT
sadf
Sonali Jain
 
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index
deponsdikosh
 
PPT
Language tools bne-5-10-2011
IMPACT Centre of Competence
 
PPT
computer Languages and Grammars.pptx and
kennethnamonye77
 
PPT
GROUP5-SYLLABLES
jhaztein
 
PPT
Os group5
karacrystal
 
PPT
GROUP5-SYLLABLES
liezel
 
PPT
GROUP5-SYLLABLES
Sofia Palawan
 
PPT
Os Group5
Cristine may sol
 
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index Reprint 2020
zhanevilla1g
 
PDF
Chapter 2: Text Operation in information stroage and retrieval
captainmactavish1996
 
PDF
01-Introduction&Languages.pdf
TariqSaeed80
 
PDF
Chinese Character Indexes Volume 1 Telegraphic Code Index
alacgabyte
 
PDF
Perfect Explorations Artemis Alexiadou (Editor)
xhekikhouly
 
PDF
Perfect Explorations Artemis Alexiadou (Editor)
csrrxrlz4045
 
IMPACT Final Conference - Katrien Depuydt
IMPACT Centre of Competence
 
02-chapter-1.ppt programming languages 10
kavitamittal18
 
brief intro for Programming Languages 02-chapter-1
SantiagoCavanagh5
 
INFO-2950-Languages-and-Grammars.ppt
LamhotNaibaho3
 
NLP new words
guest9fc47a
 
Chinese Character Indexes Volume 1 Telegraphic Code Index
deponsdikosh
 
Language tools bne-5-10-2011
IMPACT Centre of Competence
 
computer Languages and Grammars.pptx and
kennethnamonye77
 
GROUP5-SYLLABLES
jhaztein
 
Os group5
karacrystal
 
GROUP5-SYLLABLES
liezel
 
GROUP5-SYLLABLES
Sofia Palawan
 
Os Group5
Cristine may sol
 
Chinese Character Indexes Volume 1 Telegraphic Code Index Reprint 2020
zhanevilla1g
 
Chapter 2: Text Operation in information stroage and retrieval
captainmactavish1996
 
01-Introduction&Languages.pdf
TariqSaeed80
 
Chinese Character Indexes Volume 1 Telegraphic Code Index
alacgabyte
 
Perfect Explorations Artemis Alexiadou (Editor)
xhekikhouly
 
Perfect Explorations Artemis Alexiadou (Editor)
csrrxrlz4045
 
Ad

More from Daniel_Rhodes (7)

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

Recently uploaded (20)

PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Biography of Daniel Podor.pdf
Daniel Podor
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
July Patch Tuesday
Ivanti
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 

Internationalisation with PHP and Intl