Rails I18n From The Trenches

3,193 views

Published on

Slides from my talk at Rails Underground. Video from the guys as SkillsMatter will follow.

License: Creative Commons Attribution-Noncommercial-Share Alike 3.0

If you want to use my presentation in some way prohibited by this license, please get in touch with me and get my permission.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,193
On SlideShare
0
From Embeds
0
Number of Embeds
402
Actions
Shares
0
Downloads
30
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Rails I18n From The Trenches

  1. 1. Rails i18n From the Trenches Clemens Kofler
  2. 2. Hi, I’m Clemens! (Clemens Kofler, clemensk)
  3. 3. Today, I’m going to talk about ... • The latest developments in Ruby/Rails i18n • Current problems (in Rails) and potential future changes
  4. 4. i18n
  5. 5. http://guides.rails.info/i18n.html
  6. 6. i18n basics in 2 minutes
  7. 7. Do you like Gettext? (of course it’s fake)
  8. 8. _ s_ p_ t n_ ns_ np_
  9. 9. i18n news
  10. 10. Additions in i18n 0.2.0 • translation procs • custom namespace separators • Ruby 1.9-style string interpolation • (symlinked translations)
  11. 11. + a bunch of neat plugins (list at the end)
  12. 12. Additions in i18n 0.2.0 • translation procs • custom namespace separators • Ruby 1.9-style string interpolation • (symlinked translations)
  13. 13. bleeding edge
  14. 14. Current edge • Base backend + module includes • Pluralization module • Cache module • Locale fallbacks module from Globalize 2 • Chain backend from Globalize 2 • Gettext support (experimental)
  15. 15. Current edge • Base backend + module includes • Pluralization module • Cache module • Locale fallbacks module from Globalize 2 • Chain backend from Globalize 2 • Gettext support (experimental)
  16. 16. Current problems • Tools • Data input • CLDR compliance • Some unfinished integration (Date/Time#to_s, labels) • Bad Rails implementations (AR Errors) • (Clean) routing i18n nearly impossible • (Gettext support / “enterprise-readiness”)
  17. 17. Tools
  18. 18. http://github.com/svenfuchs/i18n-tools
  19. 19. Parsing dates/times is really hard (you can try out my experimental delocalize plugin)
  20. 20. You can do something like this with translate_routes but it’s basically a really scary hack.
  21. 21. i18n vs. Gettext?
  22. 22. War? Not really.
  23. 23. We are not Gettext (and we don’t want to be) ((ever))
  24. 24. Recommendations
  25. 25. The Setup • i18n edge • Translations from GitHub • (Globalize 2 for model translations) • (localized_dates for transparent date handling) • (delocalize for parsing localized input) • (translate_routes for i18n routing)
  26. 26. Questions?
  27. 27. Some resources • http://rails-i18n.org • http://guides.rails.info/i18n.html • http://github.com/svenfuchs/i18n • http://github.com/svenfuchs/rails-i18n • http://github.com/svenfuchs/i18n-tools • http://groups.google.com/group/rails-i18n • Pluralization rules: http://gist.github.com/106372
  28. 28. clemens@railway.at http://www.railway.at http://github.com/clemens
  29. 29. Image credits • http://www.sxc.hu/photo/708615 • http://www.flickr.com/photos/ferneyes/469259974/ • http://aceitapretzel.files.wordpress.com/2008/09/dexter-ap.jpg • http://www.flickr.com/photos/dunechaser/2936384313/ • http://www.festivalcervantino.gob.mx/Ficesmas/prensa/galerias/oct/12/ Hamletokok/images/061012_hamlet_20FGJ.jpg • http://www.flickr.com/photos/srgblog/1408923862/ • http://www.flickr.com/photos/purrr/126597849/

×