Successfully reported this slideshow.
Your SlideShare is downloading. ×

Let's take over the world with Zend Framework

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Go courseday3
Go courseday3
Loading in …3
×

Check these out next

1 of 55 Ad

Let's take over the world with Zend Framework

Download to read offline

Many people use Zend Framework for it's MVC implementation, but it has a lot of hidden gems. Internationalization (i18n) is one of them. We will look how you can create an application that will have the right languages, currencies, dates and times all based on the location of the visiting user. This session will take away a lot of headaches in international projects and will improve the quality in overall.

Many people use Zend Framework for it's MVC implementation, but it has a lot of hidden gems. Internationalization (i18n) is one of them. We will look how you can create an application that will have the right languages, currencies, dates and times all based on the location of the visiting user. This session will take away a lot of headaches in international projects and will improve the quality in overall.

Advertisement
Advertisement

More Related Content

More from Martin de Keijzer (17)

Recently uploaded (20)

Advertisement

Let's take over the world with Zend Framework

  1. 1. Let’s take over the world with Zend Framework Martin de Keijzer Dutch PHP Conference 2011 Monday, 23 May 2011
  2. 2. Introduction 2 Monday, 23 May 2011
  3. 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. 4. DISCLAIMER DISCLAIMER: ALL EXAMPLE CODE IS WRITTEN IN THE CONTROLLER BY EXAMPLE! USE MODELS!!!! 4 Monday, 23 May 2011
  5. 5. Monday, 23 May 2011
  6. 6. The case What do we need to take over the world? 6 Monday, 23 May 2011
  7. 7. The case ✓Location (Country and region) ✓Language ✓Date and time ✓Currency ✓Measuring 7 Monday, 23 May 2011
  8. 8. “Location! Location! Location!” Quote from Achmed (2009) 8 Monday, 23 May 2011
  9. 9. Zend Locale Monday, 23 May 2011
  10. 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. 11. Zend Locale nl_NL de_BE fr_BE nl_BE 11 Monday, 23 May 2011
  12. 12. Zend Locale CLDR Common Locale Data Repository http://cldr.unicode.org 12 Monday, 23 May 2011
  13. 13. Zend Locale 13 Monday, 23 May 2011
  14. 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. 15. Zend Locale 15 Monday, 23 May 2011
  16. 16. Zend Locale 16 Monday, 23 May 2011
  17. 17. Zend Locale In FR people speak fr 17 Monday, 23 May 2011
  18. 18. Zend Locale In FR people speak fr. In France people speak French. 18 Monday, 23 May 2011
  19. 19. Zend Locale 19 Monday, 23 May 2011
  20. 20. Zend Locale 20 Monday, 23 May 2011
  21. 21. Zend Locale array(6) { ["yes"]=> string(2) "ja" ["no"]=> string(3) "nee" } 21 Monday, 23 May 2011
  22. 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. 23. Zend Locale ["yesexpr"]=> string(20) "^([jJ][aA]?)|([jJ]?)" ["noexpr"]=> string(26) "^([nN]([eE][eE])?)| ([nN]?)" 23 Monday, 23 May 2011
  24. 24. Zend Locale A list of supported locales: http://framework.zend.com/manual/ en/zend.locale.appendix.html 24 Monday, 23 May 2011
  25. 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. 26. Speaking the language Zend_Translate 26 Monday, 23 May 2011
  27. 27. Zend Translate Operates using adapters: Array Csv Gettext Tbx Tmx Qt Xliff Xmltm 27 Monday, 23 May 2011
  28. 28. Zend Translate 28 Monday, 23 May 2011
  29. 29. Zend Translate 29 Monday, 23 May 2011
  30. 30. Zend Translate nl.php fr.php 30 Monday, 23 May 2011
  31. 31. Zend Translate my-view.phtml 31 Monday, 23 May 2011
  32. 32. Zend Locale 32 Monday, 23 May 2011
  33. 33. Zend Locale Quick hint: Google uses locales too! Zend Framework is your gateway to more power! 33 Monday, 23 May 2011
  34. 34. Monday, 23 May 2011
  35. 35. Do not get lost in time Zend_Date 35 Monday, 23 May 2011
  36. 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. 37. Zend Timesync 2 mai 2011 21:25:09 37 Monday, 23 May 2011
  38. 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. 39. Show me the money! Zend_Currency 39 Monday, 23 May 2011
  40. 40. Zend Currency 40 Monday, 23 May 2011
  41. 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. 42. Zend Currency 42 Monday, 23 May 2011
  43. 43. Zend Currency Please hand me 10.00 US Dollar for food and shelter. 43 Monday, 23 May 2011
  44. 44. Zend Currency Got lost in locales? getCurrencyList() getRegionList() getLocale() 44 Monday, 23 May 2011
  45. 45. Never trust a user! Zend_Validate 45 Monday, 23 May 2011
  46. 46. Zend Validate 46 Monday, 23 May 2011
  47. 47. Zend Validate 47 Monday, 23 May 2011
  48. 48. Measures please? Zend_Measure 48 Monday, 23 May 2011
  49. 49. Zend Measure 49 Monday, 23 May 2011
  50. 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. 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. 52. Conclusion 52 Monday, 23 May 2011
  53. 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. 54. Questions ? 54 Monday, 23 May 2011
  55. 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

×