SlideShare a Scribd company logo
1 of 55
Download to read offline
Let’s take over the world
                                   with Zend Framework




                                         Martin de Keijzer
                               Dutch PHP Conference 2011


Monday, 23 May 2011
Introduction




                                     2
Monday, 23 May 2011
Introduction

         Martin de Keijzer


         Software engineer at Ibuildings
         Board member of PHPBenelux
         PHP 5 Zend Certified Engineer


         Twitter: Martin1982
         Joind.in: http://joind.in/3253
         Blog: www.martindekeijzer.nl




                                           3
Monday, 23 May 2011
DISCLAIMER




            DISCLAIMER: ALL EXAMPLE CODE
           IS WRITTEN IN THE CONTROLLER BY
               EXAMPLE! USE MODELS!!!!




                                             4
Monday, 23 May 2011
Monday, 23 May 2011
The case




                      What do we need to take over the
                                  world?




                                                         6
Monday, 23 May 2011
The case

            ✓Location (Country and region)

            ✓Language

            ✓Date and time

            ✓Currency

            ✓Measuring

                                             7
Monday, 23 May 2011
“Location! Location! Location!”
                                  Quote from Achmed (2009)




                                                         8
Monday, 23 May 2011
Zend Locale


Monday, 23 May 2011
Zend Locale




             A locale defines a country (territory) and a language to
                   bind the various localized information to it.




                                                                        10
Monday, 23 May 2011
Zend Locale

              nl_NL




              de_BE




              fr_BE




              nl_BE


                       11
Monday, 23 May 2011
Zend Locale

                              CLDR
                  Common Locale Data Repository
                     http://cldr.unicode.org




                                                  12
Monday, 23 May 2011
Zend Locale




                       13
Monday, 23 May 2011
Zend Locale

        The current locale is is: nl
       The browser's locale is is: nl
       The environment's locale is is: de_DE
       The set locale is is: en_US




                                               14
Monday, 23 May 2011
Zend Locale




                       15
Monday, 23 May 2011
Zend Locale




                       16
Monday, 23 May 2011
Zend Locale




                       In FR people speak fr




                                               17
Monday, 23 May 2011
Zend Locale




                  In FR people speak fr.
                  In France people speak French.

                                                   18
Monday, 23 May 2011
Zend Locale




                       19
Monday, 23 May 2011
Zend Locale




                       20
Monday, 23 May 2011
Zend Locale


          array(6) {
           ["yes"]=>
           string(2) "ja"
           ["no"]=>
           string(3) "nee"
         }
                             21
Monday, 23 May 2011
Zend Locale

                ["yesarray"]=>
                array(2) {
                  [0]=>string(2)   "ja"
                  [1]=>string(1)   "j"
                }
                ["noarray"]=>
                array(2) {
                  [0]=>string(3)   "nee"
                  [1]=>string(1)   "n"
                }




                                           22
Monday, 23 May 2011
Zend Locale




          ["yesexpr"]=>
           string(20) "^([jJ][aA]?)|([jJ]?)"
           ["noexpr"]=>
           string(26) "^([nN]([eE][eE])?)|
         ([nN]?)"




                                               23
Monday, 23 May 2011
Zend Locale




                      A list of supported locales:

            http://framework.zend.com/manual/
                en/zend.locale.appendix.html



                                                     24
Monday, 23 May 2011
Zend Locale

         Utilized by:


         Zend_Controller_Router
         Zend_Currency
         Zend_Date
         Zend_Filter
         Zend_Measure
         Zend_Service_Technorati
         Zend_Timesync
         Zend_Translate
         Zend_Validate

                                   25
Monday, 23 May 2011
Speaking the language
                      Zend_Translate




                                              26
Monday, 23 May 2011
Zend Translate

         Operates using adapters:
              Array
              Csv
              Gettext
              Tbx
              Tmx
              Qt
              Xliff
              Xmltm




                                    27
Monday, 23 May 2011
Zend Translate




                          28
Monday, 23 May 2011
Zend Translate




                          29
Monday, 23 May 2011
Zend Translate
                          nl.php




                          fr.php




                                   30
Monday, 23 May 2011
Zend Translate


                          my-view.phtml




                                          31
Monday, 23 May 2011
Zend Locale




                       32
Monday, 23 May 2011
Zend Locale




                           Quick hint: Google uses locales too!
                      Zend Framework is your gateway to more power!




                                                                      33
Monday, 23 May 2011
Monday, 23 May 2011
Do not get lost in time
                      Zend_Date




                                                35
Monday, 23 May 2011
Zend Date




                      The date is May 2, 2011 9:13:41 PM.
                       The date is 2 mei 2011 21:13:41.



                                                            36
Monday, 23 May 2011
Zend Timesync




                      2 mai 2011 21:25:09


                                            37
Monday, 23 May 2011
Zend_Locale revisited




                 You can use Zend_Locale_Format to override
                         date and number formatting.

                        I never had any use for it though.....




                                                                 38
Monday, 23 May 2011
Show me the money!
                      Zend_Currency




                                           39
Monday, 23 May 2011
Zend Currency




                         40
Monday, 23 May 2011
Zend Currency




               In the Netherlands you pay with Euro (€).
               And in the UK you pay with British Pound
                              Sterling (£).




                                                           41
Monday, 23 May 2011
Zend Currency




                         42
Monday, 23 May 2011
Zend Currency

                      Please hand me 10.00
                      US Dollar for food and
                             shelter.




                                               43
Monday, 23 May 2011
Zend Currency



                      Got lost in locales?
                        getCurrencyList()
                         getRegionList()
                           getLocale()




                                             44
Monday, 23 May 2011
Never trust a user!
                      Zend_Validate




                                            45
Monday, 23 May 2011
Zend Validate




                         46
Monday, 23 May 2011
Zend Validate




                         47
Monday, 23 May 2011
Measures please?
                      Zend_Measure




                                         48
Monday, 23 May 2011
Zend Measure




                        49
Monday, 23 May 2011
Zend Measure

            A Big Mac’s weight is 200,05 g in the Netherlands.

                          In the USA this would be
                      0.441034755500847600236309 lbs




                                                                 50
Monday, 23 May 2011
Zend Measure




                      Zend_Measure doesn’t utilize locales to give you
                       the correct units, but only the correct number
                                           formats.




                                                                         51
Monday, 23 May 2011
Conclusion




                      52
Monday, 23 May 2011
Image sources
         Achmed http://barenakedislam.wordpress.com/2011/01/27/sweden-muslim-offended-by-ahmed-the-dead-terrorist-demands-compensation-for-mental-
         anguish/jeff-dunham_achmed/

         Clocks http://blogs.manageengine.com/image/501000000062207/timezones.jpg

         Cat http://icanhascheezburger.com

         Pinky & the brain http://blogg.visir.is/purplemagic/category/truarbrogð/

         Zend Framework logo http://www.myskills.be/

         Sneaking in: http://fakeposters.com




                                                                                                                                                 53
Monday, 23 May 2011
Questions ?




                                    54
Monday, 23 May 2011
Thank you!
                                         Contact details:
                                    Twitter: @Martin1982
                      Blog: http://www.martindekeijzer.nl

                        Please give feedback on Joind.in!
                                     http://joind.in/3253

Monday, 23 May 2011

More Related Content

More from Martin de Keijzer

tiCONF Amsterdam 2014 building mobile teams
tiCONF Amsterdam 2014   building mobile teamstiCONF Amsterdam 2014   building mobile teams
tiCONF Amsterdam 2014 building mobile teamsMartin de Keijzer
 
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeNative Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeMartin de Keijzer
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildMartin de Keijzer
 
Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Martin de Keijzer
 
Native Javascript apps with PhoneGap
Native Javascript apps with PhoneGapNative Javascript apps with PhoneGap
Native Javascript apps with PhoneGapMartin de Keijzer
 
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OSMartin de Keijzer
 
2012 09-04 smart devcon - sencha touch 2
2012 09-04 smart devcon - sencha touch 22012 09-04 smart devcon - sencha touch 2
2012 09-04 smart devcon - sencha touch 2Martin de Keijzer
 
2012 09-04 smart devcon - boot to the web, boot 2 gecko
2012 09-04 smart devcon - boot to the web, boot 2 gecko2012 09-04 smart devcon - boot to the web, boot 2 gecko
2012 09-04 smart devcon - boot to the web, boot 2 geckoMartin de Keijzer
 
Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Martin de Keijzer
 
Improving code quality using CI
Improving code quality using CIImproving code quality using CI
Improving code quality using CIMartin de Keijzer
 
Continuous integration why and how? [DPC uncon quick-prep version]
Continuous integration   why and how? [DPC uncon quick-prep version]Continuous integration   why and how? [DPC uncon quick-prep version]
Continuous integration why and how? [DPC uncon quick-prep version]Martin de Keijzer
 
Een introductie voor Phpunit
Een introductie voor PhpunitEen introductie voor Phpunit
Een introductie voor PhpunitMartin de Keijzer
 

More from Martin de Keijzer (17)

tiCONF Amsterdam 2014 building mobile teams
tiCONF Amsterdam 2014   building mobile teamstiCONF Amsterdam 2014   building mobile teams
tiCONF Amsterdam 2014 building mobile teams
 
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeNative Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap Build
 
Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2
 
Native Javascript apps with PhoneGap
Native Javascript apps with PhoneGapNative Javascript apps with PhoneGap
Native Javascript apps with PhoneGap
 
Mobile is everywhere
Mobile is everywhereMobile is everywhere
Mobile is everywhere
 
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
 
2012 09-04 smart devcon - sencha touch 2
2012 09-04 smart devcon - sencha touch 22012 09-04 smart devcon - sencha touch 2
2012 09-04 smart devcon - sencha touch 2
 
2012 09-04 smart devcon - boot to the web, boot 2 gecko
2012 09-04 smart devcon - boot to the web, boot 2 gecko2012 09-04 smart devcon - boot to the web, boot 2 gecko
2012 09-04 smart devcon - boot to the web, boot 2 gecko
 
Sencha Touch 2
Sencha Touch 2Sencha Touch 2
Sencha Touch 2
 
Sencha Touch 2
Sencha Touch 2Sencha Touch 2
Sencha Touch 2
 
Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)
 
Improving code quality using CI
Improving code quality using CIImproving code quality using CI
Improving code quality using CI
 
Continuous integration why and how? [DPC uncon quick-prep version]
Continuous integration   why and how? [DPC uncon quick-prep version]Continuous integration   why and how? [DPC uncon quick-prep version]
Continuous integration why and how? [DPC uncon quick-prep version]
 
Subversion In De Praktijk
Subversion In De PraktijkSubversion In De Praktijk
Subversion In De Praktijk
 
Een introductie voor Phpunit
Een introductie voor PhpunitEen introductie voor Phpunit
Een introductie voor Phpunit
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 

Let's take over the world with Zend Framework

  • 1. Let’s take over the world with Zend Framework Martin de Keijzer Dutch PHP Conference 2011 Monday, 23 May 2011
  • 2. Introduction 2 Monday, 23 May 2011
  • 3. Introduction Martin de Keijzer Software engineer at Ibuildings Board member of PHPBenelux PHP 5 Zend Certified Engineer Twitter: Martin1982 Joind.in: http://joind.in/3253 Blog: www.martindekeijzer.nl 3 Monday, 23 May 2011
  • 4. DISCLAIMER DISCLAIMER: ALL EXAMPLE CODE IS WRITTEN IN THE CONTROLLER BY EXAMPLE! USE MODELS!!!! 4 Monday, 23 May 2011
  • 6. The case What do we need to take over the world? 6 Monday, 23 May 2011
  • 7. The case ✓Location (Country and region) ✓Language ✓Date and time ✓Currency ✓Measuring 7 Monday, 23 May 2011
  • 8. “Location! Location! Location!” Quote from Achmed (2009) 8 Monday, 23 May 2011
  • 10. Zend Locale A locale defines a country (territory) and a language to bind the various localized information to it. 10 Monday, 23 May 2011
  • 11. Zend Locale nl_NL de_BE fr_BE nl_BE 11 Monday, 23 May 2011
  • 12. Zend Locale CLDR Common Locale Data Repository http://cldr.unicode.org 12 Monday, 23 May 2011
  • 13. Zend Locale 13 Monday, 23 May 2011
  • 14. Zend Locale The current locale is is: nl The browser's locale is is: nl The environment's locale is is: de_DE The set locale is is: en_US 14 Monday, 23 May 2011
  • 15. Zend Locale 15 Monday, 23 May 2011
  • 16. Zend Locale 16 Monday, 23 May 2011
  • 17. Zend Locale In FR people speak fr 17 Monday, 23 May 2011
  • 18. Zend Locale In FR people speak fr. In France people speak French. 18 Monday, 23 May 2011
  • 19. Zend Locale 19 Monday, 23 May 2011
  • 20. Zend Locale 20 Monday, 23 May 2011
  • 21. Zend Locale array(6) { ["yes"]=> string(2) "ja" ["no"]=> string(3) "nee" } 21 Monday, 23 May 2011
  • 22. Zend Locale ["yesarray"]=> array(2) { [0]=>string(2) "ja" [1]=>string(1) "j" } ["noarray"]=> array(2) { [0]=>string(3) "nee" [1]=>string(1) "n" } 22 Monday, 23 May 2011
  • 23. Zend Locale ["yesexpr"]=> string(20) "^([jJ][aA]?)|([jJ]?)" ["noexpr"]=> string(26) "^([nN]([eE][eE])?)| ([nN]?)" 23 Monday, 23 May 2011
  • 24. Zend Locale A list of supported locales: http://framework.zend.com/manual/ en/zend.locale.appendix.html 24 Monday, 23 May 2011
  • 25. Zend Locale Utilized by: Zend_Controller_Router Zend_Currency Zend_Date Zend_Filter Zend_Measure Zend_Service_Technorati Zend_Timesync Zend_Translate Zend_Validate 25 Monday, 23 May 2011
  • 26. Speaking the language Zend_Translate 26 Monday, 23 May 2011
  • 27. Zend Translate Operates using adapters: Array Csv Gettext Tbx Tmx Qt Xliff Xmltm 27 Monday, 23 May 2011
  • 28. Zend Translate 28 Monday, 23 May 2011
  • 29. Zend Translate 29 Monday, 23 May 2011
  • 30. Zend Translate nl.php fr.php 30 Monday, 23 May 2011
  • 31. Zend Translate my-view.phtml 31 Monday, 23 May 2011
  • 32. Zend Locale 32 Monday, 23 May 2011
  • 33. Zend Locale Quick hint: Google uses locales too! Zend Framework is your gateway to more power! 33 Monday, 23 May 2011
  • 35. Do not get lost in time Zend_Date 35 Monday, 23 May 2011
  • 36. Zend Date The date is May 2, 2011 9:13:41 PM. The date is 2 mei 2011 21:13:41. 36 Monday, 23 May 2011
  • 37. Zend Timesync 2 mai 2011 21:25:09 37 Monday, 23 May 2011
  • 38. Zend_Locale revisited You can use Zend_Locale_Format to override date and number formatting. I never had any use for it though..... 38 Monday, 23 May 2011
  • 39. Show me the money! Zend_Currency 39 Monday, 23 May 2011
  • 40. Zend Currency 40 Monday, 23 May 2011
  • 41. Zend Currency In the Netherlands you pay with Euro (€). And in the UK you pay with British Pound Sterling (£). 41 Monday, 23 May 2011
  • 42. Zend Currency 42 Monday, 23 May 2011
  • 43. Zend Currency Please hand me 10.00 US Dollar for food and shelter. 43 Monday, 23 May 2011
  • 44. Zend Currency Got lost in locales? getCurrencyList() getRegionList() getLocale() 44 Monday, 23 May 2011
  • 45. Never trust a user! Zend_Validate 45 Monday, 23 May 2011
  • 46. Zend Validate 46 Monday, 23 May 2011
  • 47. Zend Validate 47 Monday, 23 May 2011
  • 48. Measures please? Zend_Measure 48 Monday, 23 May 2011
  • 49. Zend Measure 49 Monday, 23 May 2011
  • 50. Zend Measure A Big Mac’s weight is 200,05 g in the Netherlands. In the USA this would be 0.441034755500847600236309 lbs 50 Monday, 23 May 2011
  • 51. Zend Measure Zend_Measure doesn’t utilize locales to give you the correct units, but only the correct number formats. 51 Monday, 23 May 2011
  • 52. Conclusion 52 Monday, 23 May 2011
  • 53. Image sources Achmed http://barenakedislam.wordpress.com/2011/01/27/sweden-muslim-offended-by-ahmed-the-dead-terrorist-demands-compensation-for-mental- anguish/jeff-dunham_achmed/ Clocks http://blogs.manageengine.com/image/501000000062207/timezones.jpg Cat http://icanhascheezburger.com Pinky & the brain http://blogg.visir.is/purplemagic/category/truarbrogð/ Zend Framework logo http://www.myskills.be/ Sneaking in: http://fakeposters.com 53 Monday, 23 May 2011
  • 54. Questions ? 54 Monday, 23 May 2011
  • 55. Thank you! Contact details: Twitter: @Martin1982 Blog: http://www.martindekeijzer.nl Please give feedback on Joind.in! http://joind.in/3253 Monday, 23 May 2011