SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
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

Contenu connexe

Plus de 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
 

Plus de 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
 

Dernier

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Dernier (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

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