growing up with globalization
play

Growing Up with Globalization Andrew Turgeon - IBM - Pittsburgh, PA - PowerPoint PPT Presentation

Growing Up with Globalization Andrew Turgeon - IBM - Pittsburgh, PA apturgeo@us.ibm.com 1 In the Beginning 2 3 4 5 6 7 8 9 10 New Customer! Except they require the following: 8 languages other than English


  1. Growing Up with Globalization Andrew Turgeon - IBM - Pittsburgh, PA apturgeo@us.ibm.com 1

  2. In the Beginning… 2

  3. 3

  4. 4

  5. 5

  6. 6

  7. 7

  8. 8

  9. 9

  10. 10

  11. New Customer! Except they require the following: • 8 languages other than English • Culturally-accurate data formats • Timezone support for 12 unique locations • Bidirectional text capabilities 11

  12. Wish I would have prepared for that before I wrote all this code… 12

  13. Agenda • Statistics Overview • Culture-Specific Data Formats • Globalization • Bidirectional • Getting Started Languages • Basic I18n - The Rails Way • Testing • Takeaways • Variables & Pluralization 13

  14. Statistics Overview Languages of the Internet (2015) 74% of Internet traffic in English 26% 2015 was from users Other 22% who prefer or only speak German languages other than 3% French English 3% Malay Chinese 3% 21% Russian Spanish 3% 8% Japanese 3% Portuguese 4% Arabic 5% http://www.internetworldstats.com/stats7.htm 14

  15. Statistics Overview Growth of Internet Users By Language (2000-2015) 7,000% 5,250% 3,500% 1,750% 520% 0% Japanese German English French Other Spanish Malay Portuguese Chinese Russian Arabic http://www.internetworldstats.com/stats7.htm 15

  16. Statistics Overview Timezones of the Internet *Currently 39 Unique Local Times in use http://royal.pingdom.com/wp-content/uploads/2013/02/internet-users-time-zones-pingdom-5801.jpg 16

  17. I get it. What do I need to do? 17

  18. Globalization (in a nutshell) Our Job Step 1 Step 2 Internationalization Localization (i18n) (l10n) 18

  19. Watson Explorer Lots of… English… 19

  20. Getting Started • Using the pre-bundled I18n framework in Rails, add the following to the controller: • You can retrieve the locale from the user preferences (best) • Or you can try getting it from the accept language header (ok) *Make sure to use it in the html tag! 20

  21. Basic I18n - The Rails Way Somewhere in a galaxy far far away… ../app/widgets/activity_feed/ display .html.erb BAD ../config/locales/en/ activity_feed .yml • DON’T REUSE same text • Hierarchy with short keys *Note: Use ellipsis character (…), not three dots (...) 21

  22. Variables & Pluralization Bad Use interpolated variables for dynamic data • More plural forms exist in other languages • 22

  23. Culture-Specific Data Formats Bad *Required hierarchy for I18n.l usage Define all your formats in key-value lookups, including defaults • Follow similar structure for currency, numbers, and percentages • 23

  24. Timezones • Always store in UTC (ISO6801) • Always consume in currently configured timezone • Make sensible defaults, but user setting is preferred Bad Example: Time visualizations in Javascript 24

  25. Bidirectional Languages Not all languages read the same direction! HTML5 • Use Unicode • For both right-to-left AND left-to-right text at the same time, use embedded tags to indicate text direction • Serve mirrored CSS for absolute/relative positioning 25

  26. Testing • Static code analysis with i18n-tasks gem • Testing dynamic translations (with RSpec): • Transitioning from non-i18n to i18n, create a “foo” or longer word language pack for testing (easy to spot non-foo) 26

  27. Takeaways • Treat language as an abstraction from the beginning (sooner the better) • Don’t try to be a hero when doing i18n • Getting started isn’t too bad when you use a framework that is: • Maintainable • Modifiable • Testable • Translatable • addresses main pitfalls discussed in this presentation 27

  28. Q&A Andrew Turgeon - apturgeo@us.ibm.com 28

  29. Thanks! 29

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend