SlideShare une entreprise Scribd logo
1  sur  27
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? ,[object Object]
Let's us... ,[object Object]
Format numbers, times and dates
Format text ,[object Object]
See PHP docs at  http://www.php.net/manual/en/book.intl.php
Example locale differences ,[object Object]
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 ,[object Object]
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 ,[object Object]
First play and test
Functionality overview ,[object Object]
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 ,[object Object]
Dictionary ,  phonebook  and  Austrian  sort orders
See  http://de.wikipedia.org/wiki/Alphabetische_Sortierung
Basically English A to Z order but with... ,[object Object]
Where does  eszett go? ,[object Object]
Case study – sorting German ,[object Object]

Contenu connexe

En vedette

Data localization and translation
Data localization and translationData localization and translation
Data localization and translation
Motti Danino
 
Logical reasoning number series
Logical reasoning number seriesLogical reasoning number series
Logical reasoning number series
Praveesh Palakeel
 

En vedette (20)

Php
PhpPhp
Php
 
Threads in PHP - Presentation
Threads in PHP - Presentation Threads in PHP - Presentation
Threads in PHP - Presentation
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
 
Data localization and translation
Data localization and translationData localization and translation
Data localization and translation
 
Php Docs
Php DocsPhp Docs
Php Docs
 
Number Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short TricksNumber Series: How To Solve Questions with Short Tricks
Number Series: How To Solve Questions with Short Tricks
 
Number series
Number seriesNumber series
Number series
 
Multi language for php with gettext
Multi language for php with gettextMulti language for php with gettext
Multi language for php with gettext
 
Handling multibyte CSV files in PHP
Handling multibyte CSV files in PHPHandling multibyte CSV files in PHP
Handling multibyte CSV files in PHP
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Problem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data StructuresProblem Solving with Algorithms and Data Structures
Problem Solving with Algorithms and Data Structures
 
Php oop presentation
Php   oop presentationPhp   oop presentation
Php oop presentation
 
PHP presentation - Com 585
PHP presentation - Com 585PHP presentation - Com 585
PHP presentation - Com 585
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatGrand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
 
Devise | Presentation for Alpharetta PHP / Laravel Group
Devise | Presentation for Alpharetta PHP / Laravel GroupDevise | Presentation for Alpharetta PHP / Laravel Group
Devise | Presentation for Alpharetta PHP / Laravel Group
 
People code events flowchart
People code events flowchartPeople code events flowchart
People code events flowchart
 
PHP presentation
PHP presentationPHP presentation
PHP presentation
 
Logical reasoning number series
Logical reasoning number seriesLogical reasoning number series
Logical reasoning number series
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 

Similaire à Internationalisation with PHP and Intl

Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
KanwalNaz30
 
Diving into Functional Programming
Diving into Functional ProgrammingDiving into Functional Programming
Diving into Functional Programming
Lev Walkin
 

Similaire à Internationalisation with PHP and Intl (20)

IMPACT Final Conference - Katrien Depuydt
IMPACT Final Conference - Katrien DepuydtIMPACT Final Conference - Katrien Depuydt
IMPACT Final Conference - Katrien Depuydt
 
INFO-2950-Languages-and-Grammars.ppt
INFO-2950-Languages-and-Grammars.pptINFO-2950-Languages-and-Grammars.ppt
INFO-2950-Languages-and-Grammars.ppt
 
NLP new words
NLP new wordsNLP new words
NLP new words
 
sadf
sadfsadf
sadf
 
Language tools bne-5-10-2011
Language tools bne-5-10-2011Language tools bne-5-10-2011
Language tools bne-5-10-2011
 
Os Group5
Os Group5Os Group5
Os Group5
 
GROUP5-SYLLABLES
GROUP5-SYLLABLESGROUP5-SYLLABLES
GROUP5-SYLLABLES
 
Os group5
Os group5Os group5
Os group5
 
GROUP5-SYLLABLES
GROUP5-SYLLABLESGROUP5-SYLLABLES
GROUP5-SYLLABLES
 
GROUP5-SYLLABLES
GROUP5-SYLLABLESGROUP5-SYLLABLES
GROUP5-SYLLABLES
 
Chapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrievalChapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrieval
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdf
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammar
 
Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
Jurafsky, Martin.-Speech and Language Processing_ An Introduction to Natural ...
 
High Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJITHigh Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJIT
 
IKL presentation for Ontolog
IKL presentation for OntologIKL presentation for Ontolog
IKL presentation for Ontolog
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdf
 
MACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSISMACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSIS
 
Diving into Functional Programming
Diving into Functional ProgrammingDiving into Functional Programming
Diving into Functional Programming
 
Automatic Transcription Of English Connected Speech Phenomena
Automatic Transcription Of English Connected Speech PhenomenaAutomatic Transcription Of English Connected Speech Phenomena
Automatic Transcription Of English Connected Speech Phenomena
 

Plus de Daniel_Rhodes (7)

PhoneGap by Dissection
PhoneGap by DissectionPhoneGap by Dissection
PhoneGap by Dissection
 
Hyperlocalisation or "localising everything"
Hyperlocalisation or "localising everything"Hyperlocalisation or "localising everything"
Hyperlocalisation or "localising everything"
 
PHP floating point precision
PHP floating point precisionPHP floating point precision
PHP floating point precision
 
Creating a constructive comment culture
Creating a constructive comment cultureCreating a constructive comment culture
Creating a constructive comment culture
 
Character sets and iconv
Character sets and iconvCharacter sets and iconv
Character sets and iconv
 
"Character sets and iconv" PHP source code
"Character sets and iconv" PHP source code"Character sets and iconv" PHP source code
"Character sets and iconv" PHP source code
 
Multibyte string handling in PHP
Multibyte string handling in PHPMultibyte string handling in PHP
Multibyte string handling in PHP
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Internationalisation with PHP and Intl