SlideShare a Scribd company logo
1 of 55
Download to read offline
Rails i18n
From the Trenches
Clemens Kofler
Hi, I’m Clemens!
   (Clemens Kofler, clemensk)
Today, I’m going to talk about ...



 • The latest developments in Ruby/Rails i18n
 • Current problems (in Rails) and potential
   future changes
i18n
http://guides.rails.info/i18n.html
i18n basics in 2 minutes
Do you like Gettext?
       (of course it’s fake)
_
s_
p_
      t
n_
ns_
np_
i18n news
Additions in i18n 0.2.0

• translation procs
• custom namespace separators
• Ruby 1.9-style string interpolation
• (symlinked translations)
+ a bunch of neat plugins
         (list at the end)
Additions in i18n 0.2.0

• translation procs
• custom namespace separators
• Ruby 1.9-style string interpolation
• (symlinked translations)
bleeding edge
Current edge
• Base backend + module includes
• Pluralization module
• Cache module
• Locale fallbacks module from Globalize 2
• Chain backend from Globalize 2
• Gettext support (experimental)
Current edge
• Base backend + module includes
• Pluralization module
• Cache module
• Locale fallbacks module from Globalize 2
• Chain backend from Globalize 2
• Gettext support (experimental)
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”)
Tools
http://github.com/svenfuchs/i18n-tools
Parsing dates/times is
      really hard
(you can try out my experimental delocalize plugin)
You can do something like this with
translate_routes but it’s basically a really
               scary hack.
i18n vs. Gettext?
War? Not really.
We are not Gettext
   (and we don’t want to be)
             ((ever))
Recommendations
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)
Questions?
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
clemens@railway.at
  http://www.railway.at
http://github.com/clemens
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/

More Related Content

What's hot

What's hot (16)

Sinatraで触れる生SQL
Sinatraで触れる生SQLSinatraで触れる生SQL
Sinatraで触れる生SQL
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
 
.NET Core 3.0 - What's new?
.NET Core 3.0 - What's new?.NET Core 3.0 - What's new?
.NET Core 3.0 - What's new?
 
Rust meetup delhi nov 18
Rust meetup delhi nov 18Rust meetup delhi nov 18
Rust meetup delhi nov 18
 
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
[E-Dev-Day 2014][8/16] The Way How EFL is used in the Tizen, previous, curren...
 
働きやすい社内を目指す!二酸化炭素計測ツール
働きやすい社内を目指す!二酸化炭素計測ツール働きやすい社内を目指す!二酸化炭素計測ツール
働きやすい社内を目指す!二酸化炭素計測ツール
 
April JavaScript Tools
April JavaScript ToolsApril JavaScript Tools
April JavaScript Tools
 
LINEデリマでのElasticsearchの運用と監視の話
LINEデリマでのElasticsearchの運用と監視の話LINEデリマでのElasticsearchの運用と監視の話
LINEデリマでのElasticsearchの運用と監視の話
 
.NET Core Foundations - Dependency Injection, Logging & Configuration - BASTA...
.NET Core Foundations - Dependency Injection, Logging & Configuration - BASTA....NET Core Foundations - Dependency Injection, Logging & Configuration - BASTA...
.NET Core Foundations - Dependency Injection, Logging & Configuration - BASTA...
 
Flex And Rails
Flex And RailsFlex And Rails
Flex And Rails
 
Hacktoberfest - An Open Source Story
Hacktoberfest - An Open Source StoryHacktoberfest - An Open Source Story
Hacktoberfest - An Open Source Story
 
Entity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedEntity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x Advanced
 
prototype::signatures
prototype::signaturesprototype::signatures
prototype::signatures
 
Zomg: Ruby Command Line and Ruby Debugging
Zomg: Ruby Command Line and Ruby DebuggingZomg: Ruby Command Line and Ruby Debugging
Zomg: Ruby Command Line and Ruby Debugging
 
Reactive Xamarin. UA Mobile 2016.
Reactive Xamarin. UA Mobile 2016.Reactive Xamarin. UA Mobile 2016.
Reactive Xamarin. UA Mobile 2016.
 
Python for Swift
Python for SwiftPython for Swift
Python for Swift
 

Viewers also liked

Sample email submission
Sample email submissionSample email submission
Sample email submission
David Sommer
 
Stc 2014 unraveling the mysteries of localization kits
Stc 2014 unraveling the mysteries of localization kitsStc 2014 unraveling the mysteries of localization kits
Stc 2014 unraveling the mysteries of localization kits
David Sommer
 
Bank Account Of Life
Bank Account Of LifeBank Account Of Life
Bank Account Of Life
Nafass
 
My Valentine Gift - YOU Decide
My Valentine Gift - YOU DecideMy Valentine Gift - YOU Decide
My Valentine Gift - YOU Decide
SizzlynRose
 
2008 Fourth Quarter Real Estate Commentary
2008 Fourth Quarter Real Estate Commentary2008 Fourth Quarter Real Estate Commentary
2008 Fourth Quarter Real Estate Commentary
alghanim
 
Sample of instructions
Sample of instructionsSample of instructions
Sample of instructions
David Sommer
 
How to make intelligent web apps
How to make intelligent web appsHow to make intelligent web apps
How to make intelligent web apps
iapain
 
My trans kit checklist gw1 ds1_gw3
My trans kit checklist gw1 ds1_gw3My trans kit checklist gw1 ds1_gw3
My trans kit checklist gw1 ds1_gw3
David Sommer
 

Viewers also liked (20)

Sample email submission
Sample email submissionSample email submission
Sample email submission
 
Designing for Multiple Mobile Platforms
Designing for Multiple Mobile PlatformsDesigning for Multiple Mobile Platforms
Designing for Multiple Mobile Platforms
 
Stc 2014 unraveling the mysteries of localization kits
Stc 2014 unraveling the mysteries of localization kitsStc 2014 unraveling the mysteries of localization kits
Stc 2014 unraveling the mysteries of localization kits
 
Strategies for Friendly English and Successful Localization (InfoDevWorld 2014)
Strategies for Friendly English and Successful Localization (InfoDevWorld 2014)Strategies for Friendly English and Successful Localization (InfoDevWorld 2014)
Strategies for Friendly English and Successful Localization (InfoDevWorld 2014)
 
Bank Account Of Life
Bank Account Of LifeBank Account Of Life
Bank Account Of Life
 
My Valentine Gift - YOU Decide
My Valentine Gift - YOU DecideMy Valentine Gift - YOU Decide
My Valentine Gift - YOU Decide
 
Shrunken Head
 Shrunken Head  Shrunken Head
Shrunken Head
 
mobile development platforms
mobile development platformsmobile development platforms
mobile development platforms
 
2008 Fourth Quarter Real Estate Commentary
2008 Fourth Quarter Real Estate Commentary2008 Fourth Quarter Real Estate Commentary
2008 Fourth Quarter Real Estate Commentary
 
Sample of instructions
Sample of instructionsSample of instructions
Sample of instructions
 
How to make intelligent web apps
How to make intelligent web appsHow to make intelligent web apps
How to make intelligent web apps
 
Building Quality Experiences for Users in Any Language
Building Quality Experiences for Users in Any LanguageBuilding Quality Experiences for Users in Any Language
Building Quality Experiences for Users in Any Language
 
Internationalization in Rails 2.2
Internationalization in Rails 2.2Internationalization in Rails 2.2
Internationalization in Rails 2.2
 
Strategies for Friendly English and Successful Localization
Strategies for Friendly English and Successful LocalizationStrategies for Friendly English and Successful Localization
Strategies for Friendly English and Successful Localization
 
My trans kit checklist gw1 ds1_gw3
My trans kit checklist gw1 ds1_gw3My trans kit checklist gw1 ds1_gw3
My trans kit checklist gw1 ds1_gw3
 
Putting Out Fires with Content Strategy (InfoDevDC meetup)
Putting Out Fires with Content Strategy (InfoDevDC meetup)Putting Out Fires with Content Strategy (InfoDevDC meetup)
Putting Out Fires with Content Strategy (InfoDevDC meetup)
 
Silmeyiniz
SilmeyinizSilmeyiniz
Silmeyiniz
 
Open Software Platforms for Mobile Digital Broadcasting
Open Software Platforms for Mobile Digital BroadcastingOpen Software Platforms for Mobile Digital Broadcasting
Open Software Platforms for Mobile Digital Broadcasting
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj Kumar
 
Putting Out Fires with Content Strategy (STC Academic SIG)
Putting Out Fires with Content Strategy (STC Academic SIG)Putting Out Fires with Content Strategy (STC Academic SIG)
Putting Out Fires with Content Strategy (STC Academic SIG)
 

Similar to Rails I18n From The Trenches

[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
Christopher Schmitt
 
Pylons + Tokyo Cabinet
Pylons + Tokyo CabinetPylons + Tokyo Cabinet
Pylons + Tokyo Cabinet
Ben Cheng
 

Similar to Rails I18n From The Trenches (20)

[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
cadec-2017-golang
cadec-2017-golangcadec-2017-golang
cadec-2017-golang
 
Pylons + Tokyo Cabinet
Pylons + Tokyo CabinetPylons + Tokyo Cabinet
Pylons + Tokyo Cabinet
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013
 
Easy contributable internationalization process with Sphinx @ pyconmy2015
Easy contributable internationalization process with Sphinx @ pyconmy2015Easy contributable internationalization process with Sphinx @ pyconmy2015
Easy contributable internationalization process with Sphinx @ pyconmy2015
 
Joe Damato
Joe DamatoJoe Damato
Joe Damato
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
FOSDEM2018 Janus Lua plugin presentation
FOSDEM2018 Janus Lua plugin presentationFOSDEM2018 Janus Lua plugin presentation
FOSDEM2018 Janus Lua plugin presentation
 
The future of templating and frameworks
The future of templating and frameworksThe future of templating and frameworks
The future of templating and frameworks
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
 
Versions
VersionsVersions
Versions
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Rails I18n From The Trenches

  • 1. Rails i18n From the Trenches Clemens Kofler
  • 2. Hi, I’m Clemens! (Clemens Kofler, clemensk)
  • 3. Today, I’m going to talk about ... • The latest developments in Ruby/Rails i18n • Current problems (in Rails) and potential future changes
  • 5.
  • 7. i18n basics in 2 minutes
  • 8.
  • 9. Do you like Gettext? (of course it’s fake)
  • 10. _ s_ p_ t n_ ns_ np_
  • 11.
  • 12.
  • 14. Additions in i18n 0.2.0 • translation procs • custom namespace separators • Ruby 1.9-style string interpolation • (symlinked translations)
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. + a bunch of neat plugins (list at the end)
  • 22. Additions in i18n 0.2.0 • translation procs • custom namespace separators • Ruby 1.9-style string interpolation • (symlinked translations)
  • 24. Current edge • Base backend + module includes • Pluralization module • Cache module • Locale fallbacks module from Globalize 2 • Chain backend from Globalize 2 • Gettext support (experimental)
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Current edge • Base backend + module includes • Pluralization module • Cache module • Locale fallbacks module from Globalize 2 • Chain backend from Globalize 2 • Gettext support (experimental)
  • 34. 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”)
  • 35. Tools
  • 37.
  • 38.
  • 39. Parsing dates/times is really hard (you can try out my experimental delocalize plugin)
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. You can do something like this with translate_routes but it’s basically a really scary hack.
  • 48. We are not Gettext (and we don’t want to be) ((ever))
  • 50. 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)
  • 51.
  • 53. 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
  • 55. 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/