SlideShare a Scribd company logo
translationexchange.com
Powered by Translation Exchange
Translation Markup Language
for Ruby on Rails
Michael Berkovich
michael@translationexchange.com
@translationx
translationexchange.com
Localization is cumbersome
translationexchange.com
There are many
standards, but little
guidance.
“
Every i18n framework has its own “right way”
of doing things, with a different syntax and file
format.
Developers often hack together their own
solutions to try and simplify the process.
No universality
in the current
standards
Android .xml
Apple .strings
Apple .plist
Gettext .po
Gettext .pot
Java .properties
Java .xml
Microsoft .resx
Microsoft .resw
Microsoft .resjson
Microsoft .aspx
FILE FORMATS
Lots of translation
Microsoft .rc
PHP .ini
PHP .conf
Babel Flash .xml
Blackberry .rrc
NSIS .insh
QT Linguist .ts
Latex .latex
Docbook .dbk
TBX .tbx
TMX .tmx
XLIFF .xliff
YouTube .sbv
Rails YAML .yaml
Subtitles .srt
MicroDVD .sub
Subviewer .sub
Mozilla Web L10N
Text .txt
CSV Spreadsheet
Excel Spreadsheet
Word Document
Extract content into
files
Upload files to a TMS
or an LSP
Wait... Download translated
files
Put translations back
in your app
Repeat when new content is added or changed
BOTTLENECK
File management is a
File Management
● Not DRY (Don’t Repeat Yourself)
● Requires content extraction, sync with a TMS or an LSP
● Mini “waterfalls” in the agile process
● Slows down development cycle and releases
● High upfront cost and maintenance
How can we make it
BETTER FOR
EVERYONE
What would an ideal solution
look like?
● Consistency
Provide tools that offer a clear and
consistent way for internationalizing
content across all frameworks
● Adaptability
Tools must be extensible and adaptable
and should be able to solve any arising
internationalization and localization
problem
● Contextualization
Allow translators to translate in context
from within the application
● Agility
Keep the development cycle agile -
localization must not add significant
overhead for developers - it must be done
in parallel to the development process
あ
A
Translation Management
Service
Global CDN
Local Cache
Application
with SDK
A Better Way
A truly automated and continuous localization
Translation Caching
static and dynamic cache adapters for
storing translations in your application
Inline Translation Tools
Translation can be done in context of the
application
Access Professional Translators
Connect your application to thousands of
professional translators around the world
Open Source
all SDKs are available on github
Multiple Platforms
support for Rails, Node, PHP, Python, iOS,
Android and more
Universal Translation Memory
Translations are shared across all
applications
translationexchange.com
Core Benefits
Getting Started
translationexchange.com
gem 'tml-rails'
Integration
# Gemfile
translationexchange.com
Configuration
# initializers/tml.rb
Tml.configure do |config|
config.application = {
key: “YOUR_APPLICATION_KEY”
}
end
translationexchange.com
# layouts/application.html.erb
<%= tml_scripts_tag %>
<%= tml_language_selector_tag(:flags) %>
Translation Markup Language
Developer friendly syntax for marking up application content.
Supports language context rules and language cases, making translations
significantly more accurate for any language.
translationexchange.com
Hello World
<%= tr('Hello World') %>
translationexchange.com
Translation Markup Language
tr('Eats shoots and leaves', 'a panda')
Eats shoots and leaves
tr('Eats shoots and leaves', 'a violent restaurant patron')
Translation Markup Language
Description & Context
Hello Michael
translationexchange.com
Translation Markup Language
Data Tokens & Interpolation
<%= tr('Hello {name}', {name:'Michael'}) %>
Hello Michael
<%= tr('Hello [bold: {user}]', {
user: current_user
}) %>
translationexchange.com
Translation Markup Language
Decoration Tokens
Hello Michael
<%= tr('Hello <strong>{user}</strong>', {
user: current_user
}) %>
translationexchange.com
Translation Markup Language
Decoration Tokens
Hello Michael
<%= tr('Hello [bold: {user}]', {
user: current_user,
bold: '<strong>{$0}</strong>'
}) %>
translationexchange.com
Translation Markup Language
Decoration Tokens
You have 5 messages
<%= tr(You have {count || message}', {
count: 5
}) %>
translationexchange.com
Translation Markup Language
Pluralization
Michael uploaded 3 photos
<%= tr('{user} uploaded {count || photo}', {
user: current_user,
count: 3
}) %>
translationexchange.com
Translation Markup Language
Pluralization
Michael liked Anna’s post
<%= tr('{actor} liked {target::pos} post', {
actor: current_user,
target: other_user
}) %>
translationexchange.com
Translation Markup Language
Language Cases
This is your second warning
<%= tr(This is your {count::ord} warning', {
count: 2
}) %>
translationexchange.com
Translation Markup Language
Language Cases
Michael completed 3 miles on his last run.
<%= tr('[link: {user}] completed [bold: {count || mile}]
on {user | his, her} last run.', {
user: current_user,
link: { href: user_path },
count: 3
}) %>
translationexchange.com
Translation Markup Language
Demo
❏ Use TML SDK to localize an online recipes application
❏ Demonstrate crowdsourced localization tools
❏ Deploy translation release and update application realtime
❏ Download release snapshot and run Foody independently from the
service
translationexchange.com
How is Translation Done?
translationexchange.com
Machine Translation
provided by Google,
Microsoft and Yandex.
Translations are ranked to
get the best result.
Crowdsourced Translation
Some developers may
choose to use their own
users to translate their
content, similar to how
Facebook and Twitter
translated their sites.
Professional Translation
Order are received and
processed by our partners
and are made available in our
system within hours.
Caching Options
translationexchange.com
Static Cache
File based cache. Loaded into the process
memory and must be deployed with the
source code. Each process contains the
entire translation cache.
$ bundle exec rake tml:cache:generate
Dynamic Cache
Redis, Memcached (and others) updated
from CDN release. Cache is shared
across all processes. Can be deployed
without restarting servers.
$ bundle exec rake tml:cache:upgrade
SDKs https://github.com/translationexchange
Documentation http://translationexchange.com/docs
Blog http://blog.translationexchange.com
Foody Source https://github.com/translationexchange/tml-rails-samples-foody
Foody Live http://foody.translationexchange.com
Facebook https://www.facebook.com/translationexchange
Twitter @translationx
Feedback feedback@translationexchange.com
translationexchange.com
Resources
Thank You
Find out more at translationexchange.com
translationexchange.com

More Related Content

PPTX
CocoaConf: The Language of Mobile Software is APIs
PPT
Building scalable and language independent java services using apache thrift
PDF
Fast and Reliable Swift APIs with gRPC
PDF
Build Great Networked APIs with Swift, OpenAPI, and gRPC
PPTX
Modern webservices using gRPC and Protocol Buffers in Golang
PDF
Emscripten - compile your C/C++ to JavaScript
PDF
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
DOC
Source-to-Source Compiler
CocoaConf: The Language of Mobile Software is APIs
Building scalable and language independent java services using apache thrift
Fast and Reliable Swift APIs with gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Modern webservices using gRPC and Protocol Buffers in Golang
Emscripten - compile your C/C++ to JavaScript
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
Source-to-Source Compiler

What's hot (20)

PPTX
C compilation process
PDF
Livecode widget course
ODP
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
PDF
Ballerina: A Cloud Native Programming Language
PPTX
Transpilers(Source-to-Source Compilers)
PPTX
Overview of microsoft dot net platforms
PDF
201801 CSE240 Lecture 04
PDF
Enforcing API Design Rules for High Quality Code Generation
PDF
蔡学镛 Rebol漫谈
PDF
Build your next REST API with gRPC
PDF
Onivim: Modal Editing from the Future
PPT
Programming paradigm and web programming
PDF
Flink Forward Berlin 2018: Robert Bradshaw & Maximilian Michels - "Universal ...
PDF
Challenges in Debugging Bootstraps of Reflective Kernels
PPT
CGI Introduction
PDF
Object oriented-programming-in-c-sharp
PDF
Implementing OpenAPI and GraphQL services with gRPC
PPTX
Onivim 2: Re-architecting for Performance
KEY
Language Engineering in the Cloud
PPT
CGI Presentation
C compilation process
Livecode widget course
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
Ballerina: A Cloud Native Programming Language
Transpilers(Source-to-Source Compilers)
Overview of microsoft dot net platforms
201801 CSE240 Lecture 04
Enforcing API Design Rules for High Quality Code Generation
蔡学镛 Rebol漫谈
Build your next REST API with gRPC
Onivim: Modal Editing from the Future
Programming paradigm and web programming
Flink Forward Berlin 2018: Robert Bradshaw & Maximilian Michels - "Universal ...
Challenges in Debugging Bootstraps of Reflective Kernels
CGI Introduction
Object oriented-programming-in-c-sharp
Implementing OpenAPI and GraphQL services with gRPC
Onivim 2: Re-architecting for Performance
Language Engineering in the Cloud
CGI Presentation
Ad

Viewers also liked (20)

PDF
Laura Dent: Single-Source and Localization
PPTX
TAUS 2.0 and the Game Changers in Localization (Jaap van der Meer, director o...
PDF
Jim Tivy: The Localization Lifecycle
PPTX
WiL Agile Localization event
PDF
Quality and Localization Effectiveness
DOCX
Yogesh Updated_C.V
PPTX
PDF
Move Our DITA Content to Another CCMS? Seriously? - IXIASOFT User Conference ...
PDF
Parkour: Lessons in Agility - July 2016
PPTX
Language Service and Technology Providers role in an Agile i18n and L10n proc...
PDF
Single-Sourcing and Localization stc16
PDF
2016 content trends
PPTX
Quality estimation: the Holy Grail in the MT scene (Gábor Bessenyei, CEO of M...
PDF
Game Localization, Indie devs edition by Silvia Fornós
PPTX
Localization and DITA: What you Need to Know - LocWorld32
PDF
LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!
PDF
How to write effective requirements in an Agile environment by Matteo Taddei
POTX
Agile Linguistic QA, by Vince He, HP Enterprise
PPTX
Enterprise Localization Trends Webinar
PDF
Continuous Globalization Workflow Webinar Slides
Laura Dent: Single-Source and Localization
TAUS 2.0 and the Game Changers in Localization (Jaap van der Meer, director o...
Jim Tivy: The Localization Lifecycle
WiL Agile Localization event
Quality and Localization Effectiveness
Yogesh Updated_C.V
Move Our DITA Content to Another CCMS? Seriously? - IXIASOFT User Conference ...
Parkour: Lessons in Agility - July 2016
Language Service and Technology Providers role in an Agile i18n and L10n proc...
Single-Sourcing and Localization stc16
2016 content trends
Quality estimation: the Holy Grail in the MT scene (Gábor Bessenyei, CEO of M...
Game Localization, Indie devs edition by Silvia Fornós
Localization and DITA: What you Need to Know - LocWorld32
LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!
How to write effective requirements in an Agile environment by Matteo Taddei
Agile Linguistic QA, by Vince He, HP Enterprise
Enterprise Localization Trends Webinar
Continuous Globalization Workflow Webinar Slides
Ad

Similar to Tml for Ruby on Rails (20)

PDF
Tml for Laravel
PDF
Translation Markup Language and Universal Translation Memory
PDF
Tml for Objective C
PDF
99translations For Developers
PDF
Tr8n for php - Michael Berkovich
PDF
99translations For Developers
PDF
AIM | HDC 2016 Globalization As a Service
PDF
Telelingua Corporate Brochure - EN
PDF
Telelingua Corporate Brochure 2016 - EN LRs
PPTX
Localization: How to do a global project
PDF
Improving App Translations
PDF
App Localization Tools Guide
PPTX
5 Steps to Open Your Website to a Global Audience
PDF
Managing Translation Workflows in Drupal 7
PPT
Language Exchange Client Presentation
PPT
Language Exchange Client Presentation
PPTX
Opening the Black Box of Software Localization
PDF
Translation Management
PPTX
TranslateKarate - Pitchdeck
PPTX
Easyling at atc London
Tml for Laravel
Translation Markup Language and Universal Translation Memory
Tml for Objective C
99translations For Developers
Tr8n for php - Michael Berkovich
99translations For Developers
AIM | HDC 2016 Globalization As a Service
Telelingua Corporate Brochure - EN
Telelingua Corporate Brochure 2016 - EN LRs
Localization: How to do a global project
Improving App Translations
App Localization Tools Guide
5 Steps to Open Your Website to a Global Audience
Managing Translation Workflows in Drupal 7
Language Exchange Client Presentation
Language Exchange Client Presentation
Opening the Black Box of Software Localization
Translation Management
TranslateKarate - Pitchdeck
Easyling at atc London

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.

Tml for Ruby on Rails

  • 1. translationexchange.com Powered by Translation Exchange Translation Markup Language for Ruby on Rails
  • 4. There are many standards, but little guidance. “
  • 5. Every i18n framework has its own “right way” of doing things, with a different syntax and file format. Developers often hack together their own solutions to try and simplify the process. No universality in the current standards
  • 6. Android .xml Apple .strings Apple .plist Gettext .po Gettext .pot Java .properties Java .xml Microsoft .resx Microsoft .resw Microsoft .resjson Microsoft .aspx FILE FORMATS Lots of translation Microsoft .rc PHP .ini PHP .conf Babel Flash .xml Blackberry .rrc NSIS .insh QT Linguist .ts Latex .latex Docbook .dbk TBX .tbx TMX .tmx XLIFF .xliff YouTube .sbv Rails YAML .yaml Subtitles .srt MicroDVD .sub Subviewer .sub Mozilla Web L10N Text .txt CSV Spreadsheet Excel Spreadsheet Word Document
  • 7. Extract content into files Upload files to a TMS or an LSP Wait... Download translated files Put translations back in your app Repeat when new content is added or changed BOTTLENECK File management is a
  • 8. File Management ● Not DRY (Don’t Repeat Yourself) ● Requires content extraction, sync with a TMS or an LSP ● Mini “waterfalls” in the agile process ● Slows down development cycle and releases ● High upfront cost and maintenance
  • 9. How can we make it BETTER FOR EVERYONE
  • 10. What would an ideal solution look like? ● Consistency Provide tools that offer a clear and consistent way for internationalizing content across all frameworks ● Adaptability Tools must be extensible and adaptable and should be able to solve any arising internationalization and localization problem ● Contextualization Allow translators to translate in context from within the application ● Agility Keep the development cycle agile - localization must not add significant overhead for developers - it must be done in parallel to the development process
  • 11. あ A Translation Management Service Global CDN Local Cache Application with SDK A Better Way A truly automated and continuous localization
  • 12. Translation Caching static and dynamic cache adapters for storing translations in your application Inline Translation Tools Translation can be done in context of the application Access Professional Translators Connect your application to thousands of professional translators around the world Open Source all SDKs are available on github Multiple Platforms support for Rails, Node, PHP, Python, iOS, Android and more Universal Translation Memory Translations are shared across all applications translationexchange.com Core Benefits
  • 15. Configuration # initializers/tml.rb Tml.configure do |config| config.application = { key: “YOUR_APPLICATION_KEY” } end translationexchange.com # layouts/application.html.erb <%= tml_scripts_tag %> <%= tml_language_selector_tag(:flags) %>
  • 16. Translation Markup Language Developer friendly syntax for marking up application content. Supports language context rules and language cases, making translations significantly more accurate for any language. translationexchange.com
  • 17. Hello World <%= tr('Hello World') %> translationexchange.com Translation Markup Language
  • 18. tr('Eats shoots and leaves', 'a panda') Eats shoots and leaves tr('Eats shoots and leaves', 'a violent restaurant patron') Translation Markup Language Description & Context
  • 19. Hello Michael translationexchange.com Translation Markup Language Data Tokens & Interpolation <%= tr('Hello {name}', {name:'Michael'}) %>
  • 20. Hello Michael <%= tr('Hello [bold: {user}]', { user: current_user }) %> translationexchange.com Translation Markup Language Decoration Tokens
  • 21. Hello Michael <%= tr('Hello <strong>{user}</strong>', { user: current_user }) %> translationexchange.com Translation Markup Language Decoration Tokens
  • 22. Hello Michael <%= tr('Hello [bold: {user}]', { user: current_user, bold: '<strong>{$0}</strong>' }) %> translationexchange.com Translation Markup Language Decoration Tokens
  • 23. You have 5 messages <%= tr(You have {count || message}', { count: 5 }) %> translationexchange.com Translation Markup Language Pluralization
  • 24. Michael uploaded 3 photos <%= tr('{user} uploaded {count || photo}', { user: current_user, count: 3 }) %> translationexchange.com Translation Markup Language Pluralization
  • 25. Michael liked Anna’s post <%= tr('{actor} liked {target::pos} post', { actor: current_user, target: other_user }) %> translationexchange.com Translation Markup Language Language Cases
  • 26. This is your second warning <%= tr(This is your {count::ord} warning', { count: 2 }) %> translationexchange.com Translation Markup Language Language Cases
  • 27. Michael completed 3 miles on his last run. <%= tr('[link: {user}] completed [bold: {count || mile}] on {user | his, her} last run.', { user: current_user, link: { href: user_path }, count: 3 }) %> translationexchange.com Translation Markup Language
  • 28. Demo ❏ Use TML SDK to localize an online recipes application ❏ Demonstrate crowdsourced localization tools ❏ Deploy translation release and update application realtime ❏ Download release snapshot and run Foody independently from the service translationexchange.com
  • 29. How is Translation Done? translationexchange.com Machine Translation provided by Google, Microsoft and Yandex. Translations are ranked to get the best result. Crowdsourced Translation Some developers may choose to use their own users to translate their content, similar to how Facebook and Twitter translated their sites. Professional Translation Order are received and processed by our partners and are made available in our system within hours.
  • 30. Caching Options translationexchange.com Static Cache File based cache. Loaded into the process memory and must be deployed with the source code. Each process contains the entire translation cache. $ bundle exec rake tml:cache:generate Dynamic Cache Redis, Memcached (and others) updated from CDN release. Cache is shared across all processes. Can be deployed without restarting servers. $ bundle exec rake tml:cache:upgrade
  • 31. SDKs https://github.com/translationexchange Documentation http://translationexchange.com/docs Blog http://blog.translationexchange.com Foody Source https://github.com/translationexchange/tml-rails-samples-foody Foody Live http://foody.translationexchange.com Facebook https://www.facebook.com/translationexchange Twitter @translationx Feedback feedback@translationexchange.com translationexchange.com Resources
  • 32. Thank You Find out more at translationexchange.com translationexchange.com