SlideShare uma empresa Scribd logo
1 de 71
Baixar para ler offline
Translation Markup
Language
Universal Translation Memory
and
Michael Berkovich
michael@translationexchange.com
@translationx
Localization is
HARD
1990 (pre internet)
OS introduced support for multiple languages and ability to switch
between them
Localization is based on resource files and language bundles
2016
Progress has been made in better file resource management but
localization complexity still exists.
We still live in the same localization paradigm.
1990 (pre internet)
OS introduced support for multiple languages and ability to switch
between them
Localization is based on resource files and language bundles
2016
Progress has been made in better file resource management but
localization complexity still exists.
We still live in the same localization paradigm.
Content Translation
Date & Time Conversion
Number Formatting
Currency Conversion
User Interface Adjustments
{COMPLICATED
It’s
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
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
Some companies build their own
CUSTOM TOOLS
WhatsApp Facebook AirBnB Twitter LinkedIn Evernote
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
What are the
Proxy Servers
Smartling, Easyling
Javascript based
solutions
Localizejs, Bablic,
Transifex Live
SDK based
solutions
Translation Exchange
ALTERNATIVE SOLUTIONS
● Depends on external servers uptime
● Search engines penalize content in
ranking (from external DNS)
● Increase response time
● Does not work for dynamic content
Proxy Server Solutions
● Easy to configure
● updated automatically
● Changes can be applied outside of
source code and developer’s time
Good Bad
● Easy to implement
● Content is all in one place
● Automatic updates
● Served from your domain
● Bad for SEO (only Google does any JS)
● Adds time in rendering
● Flicker effect
● Depends on external server uptime
Javascript Solutions
Good Bad
● Easy to install
● No manual content extraction
● Content is under developer’s control
● All content is in one place
● Served by your servers
● Good for SEO
● Translations can be done in context
● Supports agile methodology
● Same syntax across all frameworks
● Translations are reused across all apps
● Supports context rules
● Does not depend on external uptime
SDK Solutions
あ
A
Translation Management
Service
Global CDN
Local Cache
Application
with SDK
SDK Flow
Caching Translations
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
Dynamic Cache
● Redis, Memcached (and others)
updated from CDN release
● Cache is shared across all
processes
● Can be deployed without
restarting servers
Translation
Tools
Developer friendly syntax for marking
up application content.
Supports language context rules and
language cases, making translations
significantly more accurate for any
language.
TRANSLATION
MARKUP
LANGUAGE
<?php tre('Hello World') ?>
<%= tr('Hello World') %>
TML.translate('Hello World')
TMLLocalizedString('Hello World')
Ruby on Rails
PHP
Java
Objective C
TML Basics
Hello World
Python, Javascript, Node.JS, Ember, Angular, etc...
Descriptions
tr('Eats shoots and leaves', 'a panda')
Eats shoots and leaves
tr('Eats shoots and leaves', 'a violent restaurant patron')
Data Tokens
tr('Hello {name}', {name: 'John'})
Hello John
Data Tokens
tr('Hello {user}', {user: [user_object, :name]})
Hello John
Passing an object
Decoration Tokens
tr('Hello [bold: World]', {bold: '<strong>{$0}</strong>'})
Hello WorldWorld
Decoration Tokens
tr('Hello <bold>World</bold>', {bold: '<strong>{$0}</strong>'})
tr('Hello <strong>World</strong>')
With HTML Syntax
Hello WorldWorld
or
Decoration Tokens
tr('Hello <link>World</link>', {link: {‘href’:‘www.google.com’}})
link: ‘<a href=”{$href}”>{$0}</a>’
With Predefined Default Decorators
Hello WorldWorld
where link is a default decoration defined as
Decoration Tokens
TMLLocalizedString('Hello <bold>World</bold>', @{
@”bold”: @{
@"font": [UIFont fontWithName:@"ChalkboardSE-Bold" size:14]
}
})
Using iOS Native Decoration Methods
Hello WorldWorld
Nested Tokens
Hello JohnJohn
Nesting Tokens
tr('Hello [bold: {name}]', {name: 'John', bold: '<strong>{$0}</strong>'})
Nested Tokens
Hello MichaelMichael
tr('Hello [bold: {user}]', {user: [current_user, :name]})
tr('Hello [bold: {user}]', {user: current_user})
or
Passing Objects
<%= tml_source('common/navigation') do %>
<ul>
<li><%= tr('Home') %></li>
<li><%= tr('Features') %></li>
<li><%= tr('Languages') %></li>
<li><%= tr('Pricing') %></li>
<li><%= tr('Docs') %></li>
</ul>
<% end %>
Sources are arbitrary groups of related strings
Sources & String Grouping
<%= trh(source: 'common/navigation') do %>
<ul>
<li>Home</li>
<li>Features</li>
<li>Languages</li>
<li>Pricing</li>
<li>Docs</li>
</ul>
<% end %>
Translation Blocks
Entire blocks can be translated without markup.
<%= trh(source: 'common/navigation') do %>
<nav>
<ul>
<li>You have <a href=’/messages’>unread messages</a></li>
<li><a href=’/logout’>Logout</a></li>
</ul>
</nav>
<% end %>
Blocks
You have [link: unread messages]
You have unread messages
Pluralization
http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
CLDR Pluralization Rules
(Common Locale Data Repository)
labels:
messages:
one: You have 1 message
other: You have {count} messages
<%= t('labels.messages', {count: 5}) %>
:rule => lambda { |n| n == 1 ? :one : :other }
Rails Code
en.yaml
messages.en.yaml
Pluralization in Rails using YAML
English
Rails Code
ru.yaml
messages.ru.yaml
Pluralization in Rails using YAML
Russian
labels:
messages:
one: У вас есть 1 сообщение
few: У вас есть {count} сообщения
other: У вас есть {count} сообщений
<%= t('labels.messages', {count: 5}) %>
:rule => lambda { |n|
n % 10 == 1 && n % 100 != 11 ? :one :
[2, 3, 4].include?(n % 10) &&
![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 ||
[5, 6, 7, 8, 9].include?(n % 10) ||
[11, 12, 13, 14].include?(n % 100) ? :many : :other
}
Pluralization in Rails using TML
English
<%= tr('You have {count || message}', {count: 5}) %>
You have 5 messages
Pluralization in Rails using TML
Russian Translation
'У вас есть {count || сообщение, сообщения, сообщений}'
У вас есть 5 сообщений
Data Token Full Definition
{count:number::ord || one: message, other: messages}
name context value options based on context ruleseparatorcase
Simplification through Configuration
{count:number || one: message, other: messages}
{count || message, messages}
{count || message}
Pluralization with TML
translations: [
{label: “You have one message”, context: {count: {number: ‘one’}},
{label: “You have {count} message”, context: {count: {number: ‘other’}},
]
<%= tr('You have {count} messages', {count: 5}) %>Rails Code
English Translations
Expanded Translations
Pluralization with TML
<%= tr('You have {count} messages', {count: 5}) %>Rails Code
Russian Translations translations: [
{label: “У вас есть {count} сообщение”, context: {count: {number: ‘one’}},
{label: “У вас есть {count} сообщения”, context: {count: {number: ‘few’}},
{label: “У вас есть {count} сообщений”, context: {count: {number: ‘other’}},
]
translations: [
{label: “‫אחת‬ ‫הודעה‬ ‫לך‬ ‫,”יש‬ context: {count: {number: ‘one’}},
{label: “‫הודעה‬ ‫שתי‬ ‫לך‬ ‫,”יש‬ context: {count: {number: ‘two’}},
{label: “‫הודעות‬ {count} ‫לך‬ ‫,”יש‬ context: {count: {number: ‘other’}},
]
Hebrew Translations
Expanded Translations
Numeric Rules Definition
English Rules:
Russian Rules: one: (&& (= 1 (mod @n 10)) (!= 11 (mod @n 100)))
few: (&& (in '2..4' (mod @n 10)) (not (in '12..14' (mod @n 100))))
other: (|| (= 0 (mod @n 10)) (in '5..9' (mod @n 10))
(in '11..14' (mod @n 100)))
one: (= @n 1)
other: (true)
Genders
Contextualization by Gender
Michael uploaded 3 photos
tr('{user} uploaded {count || photo}', {user: user, count: 3})
user = {name: ‘Michael’, gender: ‘male’}
Contextualization by Gender
Michael загрузил 3 фотографии
'{user || загрузил, загрузила} {count || фотографию, фотографии, фотографий}'
Russian Translation
dependant on gender of user dependant on value of count
male onefemale few many
Contextualization by Gender
<%= tr('{user} uploaded {count || photo}', {user: user, count: 3}) %>
Rails Code
Russian Translation (1 line)
'{user || загрузил, загрузила} {count || фотографию, фотографии, фотографий}'
Simplified
Contextualization by Gender
<%= tr('{user} uploaded {count || photo}', {user: user, count: 3}) %>
Rails Code
Russian Translations (by context)
translations: [
{label: “{user} загрузил {count} фотографию”, context: {count: {number: ‘one’}, user: {gender: ‘male’}},
{label: “{user} загрузил {count} фотографии”, context: {count: {number: ‘few’}, user: {gender: ‘male’}},
{label: “{user} загрузил {count} фотографий”, context: {count: {number: ‘other’}, user: {gender: ‘male’}},
{label: “{user} загрузила {count} фотографию”, context: {count: {number: ‘one’}, user: {gender: ‘female’}},
{label: “{user} загрузила {count} фотографии”, context: {count: {number: ‘few’}, user: {gender: ‘female’}},
{label: “{user} загрузила {count} фотографий”, context: {count: {number: ‘other’}, user: {gender: ‘female’}}
]
By Context
Language Cases
Possessive Case
Michael liked Anna’s post
“{actor} liked {target::pos} post”
Dative Case
Михаилу нравистся пост Анны
“{actor::dat} нравится пост {target::gen}”
Ordinals
This is your 2nd reminder
‘This is your {count::ord} reminder'
{date} = ‘{month_name} {days}, {years}’
Dates
English Date Format
tr('{user} was born on {date}', {user: user, date: user.birthday.tr(:verbose)})
%B = {month_name}
%d = {days}
%Y = {years}
Alex was born on July 4, 2002
verbose = ‘%B %d, %Y’ #July 4, 2002
Dates
Russian Date Format
Alex родился 4 Июля, 2002
“{user || родился, родилась} {date::gen}”
‘%d %B, %Y’ #4 Июль, 2002
{date} = ‘{days} {month_name}, {years}’
tr('[link: {user}] completed [bold: {count || mile}] on {user | his, her} last run.',{
user: [user, :name],
count: 3,
link: {href: ‘/profile’}
})
Mixing it all together
Michael completed 3 miles on his last run.
Mixing it all together
Russian Translation
Michael пробежал 3 мили в своем последнем забеге.
'[link: {user}] {user | пробежал, пробежала} [bold: {count || милю, мили, миль}]
в своем последнем забеге.'
DEMO
Framework
Support
Translations can be shared across
multiple platforms and frameworks.
UNIVERSAL
TRANSLATION
MEMORY
● Translations should be reusable across
multiple projects
● Each translation key can have many
translation options for a language based
on context
● Translation keys and translations are
unique and are only stored once in the
entire system
What is UTM?
Translation
Rankings
● Ranks are derived from user input
● Translators have ranks and voting powers
that change based on their input and
acceptable translations
● Translation usability score is derived from
how often the translation has been
locked in other projects
¡Hola Mundo!
hola mundo!
Hello Mundo
Hola World
Yo Mundo!
Que Paso, Mundo?
@!*#&
+45
+2
-2
-17
-55
-58
-99
Hello World!
+45
+22
+1
-99
Translator
Rankings
Translators have ranks and voting powers
that change based on their input and
acceptable translations.
Jenny Smith
Admin
Jeremy Swanson
Proofreader
Jessica Sawyer
Translator
Jake Stephens
Translator
Hello World Hola Mundo
안녕하세요
Привет Мир
Hallo Welt ‫עולם‬ ‫שלום‬
你好,世界
UTM Graph
SUMMARY
& CONCLUSION
Resources
SDKs https://github.com/translationexchange
Documentation http://translationexchange.com/docs
Blog http://blog.translationexchange.com
Sample App https://github.com/translationexchange/tml-rails-samples-foody
Live Sample App http://foody.translationexchange.com
Facebook https://www.facebook.com/translationexchange
Twitter @translationx
Feedback feedback@translationexchange.com
We’re Hiring!
Michael Berkovich
michael@translationexchange.com
@translationx
Thank you
QUESTIONS?

Mais conteúdo relacionado

Mais procurados

Tml for Ruby on Rails
Tml for Ruby on RailsTml for Ruby on Rails
Tml for Ruby on Rails
Michael Berkovich
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
Tim Burks
 
Join the dart side of webdevelopment reloaded
Join the dart side of webdevelopment reloadedJoin the dart side of webdevelopment reloaded
Join the dart side of webdevelopment reloaded
Claudio d'Angelis
 

Mais procurados (8)

Introduction to SDL Passolo
Introduction to SDL PassoloIntroduction to SDL Passolo
Introduction to SDL Passolo
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL Passolo
 
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03XMPP/Jingle(VoIP)/Perl Ocean 2012/03
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
 
Tml for Ruby on Rails
Tml for Ruby on RailsTml for Ruby on Rails
Tml for Ruby on Rails
 
Compiled vs interpreted Linguages
Compiled vs interpreted LinguagesCompiled vs interpreted Linguages
Compiled vs interpreted Linguages
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
 
Join the dart side of webdevelopment reloaded
Join the dart side of webdevelopment reloadedJoin the dart side of webdevelopment reloaded
Join the dart side of webdevelopment reloaded
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming Language
 

Destaque

YAML is the new Eval
YAML is the new EvalYAML is the new Eval
YAML is the new Eval
arnebrasseur
 

Destaque (14)

Tool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAMLTool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAML
 
EuroPython 2014 YAML Reader Lightning Talk
EuroPython 2014 YAML Reader Lightning TalkEuroPython 2014 YAML Reader Lightning Talk
EuroPython 2014 YAML Reader Lightning Talk
 
The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4
 
Yaml
YamlYaml
Yaml
 
YAML is the new Eval
YAML is the new EvalYAML is the new Eval
YAML is the new Eval
 
properties, yaml, and me
properties, yaml, and meproperties, yaml, and me
properties, yaml, and me
 
Docker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryDocker OpenStack Cloud Foundry
Docker OpenStack Cloud Foundry
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017
 
Intro to Codefresh YAML
Intro to Codefresh YAML  Intro to Codefresh YAML
Intro to Codefresh YAML
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 

Semelhante a Translation Markup Language and Universal Translation Memory

Tml for Laravel
Tml for LaravelTml for Laravel
Tml for Laravel
Michael Berkovich
 
Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5
hepeiwei
 

Semelhante a Translation Markup Language and Universal Translation Memory (20)

Tml for Laravel
Tml for LaravelTml for Laravel
Tml for Laravel
 
Improve Your Business Standards with Backend Development .pdf
Improve Your Business Standards with Backend Development .pdfImprove Your Business Standards with Backend Development .pdf
Improve Your Business Standards with Backend Development .pdf
 
Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5
 
IT for HR professionals
IT for HR professionalsIT for HR professionals
IT for HR professionals
 
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
Les Basiques - Web  Développement HTML5, CSS3, JS et PHPLes Basiques - Web  Développement HTML5, CSS3, JS et PHP
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
Ruby on rails intro
Ruby on rails introRuby on rails intro
Ruby on rails intro
 
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Web development intership Presentation.pptx
Web development intership Presentation.pptxWeb development intership Presentation.pptx
Web development intership Presentation.pptx
 
2010 tool forum ata handout
2010 tool forum ata handout2010 tool forum ata handout
2010 tool forum ata handout
 
PHPBootcamp - Zend Framework
PHPBootcamp - Zend FrameworkPHPBootcamp - Zend Framework
PHPBootcamp - Zend Framework
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York Times
 
AIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a ServiceAIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a Service
 
WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...WordPress Internationalization and Localization - WordPress Translation Day 3...
WordPress Internationalization and Localization - WordPress Translation Day 3...
 
3. WEB TECHNOLOGIES.pptx B.Pharm sem 2 CAP
3. WEB TECHNOLOGIES.pptx B.Pharm sem 2 CAP3. WEB TECHNOLOGIES.pptx B.Pharm sem 2 CAP
3. WEB TECHNOLOGIES.pptx B.Pharm sem 2 CAP
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 

Último

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
 
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
 
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
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Translation Markup Language and Universal Translation Memory

  • 4. 1990 (pre internet) OS introduced support for multiple languages and ability to switch between them Localization is based on resource files and language bundles 2016 Progress has been made in better file resource management but localization complexity still exists. We still live in the same localization paradigm.
  • 5. 1990 (pre internet) OS introduced support for multiple languages and ability to switch between them Localization is based on resource files and language bundles 2016 Progress has been made in better file resource management but localization complexity still exists. We still live in the same localization paradigm.
  • 6. Content Translation Date & Time Conversion Number Formatting Currency Conversion User Interface Adjustments {COMPLICATED It’s
  • 7. There are many standards, but little guidance. “
  • 8. 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
  • 9. 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 YAML .yaml Subtitles .srt MicroDVD .sub Subviewer .sub Mozilla Web L10N Text .txt CSV Spreadsheet Excel Spreadsheet Word Document
  • 10. 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
  • 11. 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
  • 12. Some companies build their own CUSTOM TOOLS WhatsApp Facebook AirBnB Twitter LinkedIn Evernote
  • 13. How can we make it BETTER FOR EVERYONE
  • 14. 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
  • 15. What are the Proxy Servers Smartling, Easyling Javascript based solutions Localizejs, Bablic, Transifex Live SDK based solutions Translation Exchange ALTERNATIVE SOLUTIONS
  • 16. ● Depends on external servers uptime ● Search engines penalize content in ranking (from external DNS) ● Increase response time ● Does not work for dynamic content Proxy Server Solutions ● Easy to configure ● updated automatically ● Changes can be applied outside of source code and developer’s time Good Bad
  • 17. ● Easy to implement ● Content is all in one place ● Automatic updates ● Served from your domain ● Bad for SEO (only Google does any JS) ● Adds time in rendering ● Flicker effect ● Depends on external server uptime Javascript Solutions Good Bad
  • 18. ● Easy to install ● No manual content extraction ● Content is under developer’s control ● All content is in one place ● Served by your servers ● Good for SEO ● Translations can be done in context ● Supports agile methodology ● Same syntax across all frameworks ● Translations are reused across all apps ● Supports context rules ● Does not depend on external uptime SDK Solutions
  • 19. あ A Translation Management Service Global CDN Local Cache Application with SDK SDK Flow
  • 20. Caching Translations 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 Dynamic Cache ● Redis, Memcached (and others) updated from CDN release ● Cache is shared across all processes ● Can be deployed without restarting servers
  • 21. Translation Tools Developer friendly syntax for marking up application content. Supports language context rules and language cases, making translations significantly more accurate for any language.
  • 23. <?php tre('Hello World') ?> <%= tr('Hello World') %> TML.translate('Hello World') TMLLocalizedString('Hello World') Ruby on Rails PHP Java Objective C TML Basics Hello World Python, Javascript, Node.JS, Ember, Angular, etc...
  • 24. Descriptions tr('Eats shoots and leaves', 'a panda') Eats shoots and leaves tr('Eats shoots and leaves', 'a violent restaurant patron')
  • 25. Data Tokens tr('Hello {name}', {name: 'John'}) Hello John
  • 26. Data Tokens tr('Hello {user}', {user: [user_object, :name]}) Hello John Passing an object
  • 27. Decoration Tokens tr('Hello [bold: World]', {bold: '<strong>{$0}</strong>'}) Hello WorldWorld
  • 28. Decoration Tokens tr('Hello <bold>World</bold>', {bold: '<strong>{$0}</strong>'}) tr('Hello <strong>World</strong>') With HTML Syntax Hello WorldWorld or
  • 29. Decoration Tokens tr('Hello <link>World</link>', {link: {‘href’:‘www.google.com’}}) link: ‘<a href=”{$href}”>{$0}</a>’ With Predefined Default Decorators Hello WorldWorld where link is a default decoration defined as
  • 30. Decoration Tokens TMLLocalizedString('Hello <bold>World</bold>', @{ @”bold”: @{ @"font": [UIFont fontWithName:@"ChalkboardSE-Bold" size:14] } }) Using iOS Native Decoration Methods Hello WorldWorld
  • 31. Nested Tokens Hello JohnJohn Nesting Tokens tr('Hello [bold: {name}]', {name: 'John', bold: '<strong>{$0}</strong>'})
  • 32. Nested Tokens Hello MichaelMichael tr('Hello [bold: {user}]', {user: [current_user, :name]}) tr('Hello [bold: {user}]', {user: current_user}) or Passing Objects
  • 33. <%= tml_source('common/navigation') do %> <ul> <li><%= tr('Home') %></li> <li><%= tr('Features') %></li> <li><%= tr('Languages') %></li> <li><%= tr('Pricing') %></li> <li><%= tr('Docs') %></li> </ul> <% end %> Sources are arbitrary groups of related strings Sources & String Grouping
  • 34. <%= trh(source: 'common/navigation') do %> <ul> <li>Home</li> <li>Features</li> <li>Languages</li> <li>Pricing</li> <li>Docs</li> </ul> <% end %> Translation Blocks Entire blocks can be translated without markup.
  • 35. <%= trh(source: 'common/navigation') do %> <nav> <ul> <li>You have <a href=’/messages’>unread messages</a></li> <li><a href=’/logout’>Logout</a></li> </ul> </nav> <% end %> Blocks You have [link: unread messages] You have unread messages
  • 38. labels: messages: one: You have 1 message other: You have {count} messages <%= t('labels.messages', {count: 5}) %> :rule => lambda { |n| n == 1 ? :one : :other } Rails Code en.yaml messages.en.yaml Pluralization in Rails using YAML English
  • 39. Rails Code ru.yaml messages.ru.yaml Pluralization in Rails using YAML Russian labels: messages: one: У вас есть 1 сообщение few: У вас есть {count} сообщения other: У вас есть {count} сообщений <%= t('labels.messages', {count: 5}) %> :rule => lambda { |n| n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other }
  • 40. Pluralization in Rails using TML English <%= tr('You have {count || message}', {count: 5}) %> You have 5 messages
  • 41. Pluralization in Rails using TML Russian Translation 'У вас есть {count || сообщение, сообщения, сообщений}' У вас есть 5 сообщений
  • 42. Data Token Full Definition {count:number::ord || one: message, other: messages} name context value options based on context ruleseparatorcase
  • 43. Simplification through Configuration {count:number || one: message, other: messages} {count || message, messages} {count || message}
  • 44. Pluralization with TML translations: [ {label: “You have one message”, context: {count: {number: ‘one’}}, {label: “You have {count} message”, context: {count: {number: ‘other’}}, ] <%= tr('You have {count} messages', {count: 5}) %>Rails Code English Translations Expanded Translations
  • 45. Pluralization with TML <%= tr('You have {count} messages', {count: 5}) %>Rails Code Russian Translations translations: [ {label: “У вас есть {count} сообщение”, context: {count: {number: ‘one’}}, {label: “У вас есть {count} сообщения”, context: {count: {number: ‘few’}}, {label: “У вас есть {count} сообщений”, context: {count: {number: ‘other’}}, ] translations: [ {label: “‫אחת‬ ‫הודעה‬ ‫לך‬ ‫,”יש‬ context: {count: {number: ‘one’}}, {label: “‫הודעה‬ ‫שתי‬ ‫לך‬ ‫,”יש‬ context: {count: {number: ‘two’}}, {label: “‫הודעות‬ {count} ‫לך‬ ‫,”יש‬ context: {count: {number: ‘other’}}, ] Hebrew Translations Expanded Translations
  • 46. Numeric Rules Definition English Rules: Russian Rules: one: (&& (= 1 (mod @n 10)) (!= 11 (mod @n 100))) few: (&& (in '2..4' (mod @n 10)) (not (in '12..14' (mod @n 100)))) other: (|| (= 0 (mod @n 10)) (in '5..9' (mod @n 10)) (in '11..14' (mod @n 100))) one: (= @n 1) other: (true)
  • 48. Contextualization by Gender Michael uploaded 3 photos tr('{user} uploaded {count || photo}', {user: user, count: 3}) user = {name: ‘Michael’, gender: ‘male’}
  • 49. Contextualization by Gender Michael загрузил 3 фотографии '{user || загрузил, загрузила} {count || фотографию, фотографии, фотографий}' Russian Translation dependant on gender of user dependant on value of count male onefemale few many
  • 50. Contextualization by Gender <%= tr('{user} uploaded {count || photo}', {user: user, count: 3}) %> Rails Code Russian Translation (1 line) '{user || загрузил, загрузила} {count || фотографию, фотографии, фотографий}' Simplified
  • 51. Contextualization by Gender <%= tr('{user} uploaded {count || photo}', {user: user, count: 3}) %> Rails Code Russian Translations (by context) translations: [ {label: “{user} загрузил {count} фотографию”, context: {count: {number: ‘one’}, user: {gender: ‘male’}}, {label: “{user} загрузил {count} фотографии”, context: {count: {number: ‘few’}, user: {gender: ‘male’}}, {label: “{user} загрузил {count} фотографий”, context: {count: {number: ‘other’}, user: {gender: ‘male’}}, {label: “{user} загрузила {count} фотографию”, context: {count: {number: ‘one’}, user: {gender: ‘female’}}, {label: “{user} загрузила {count} фотографии”, context: {count: {number: ‘few’}, user: {gender: ‘female’}}, {label: “{user} загрузила {count} фотографий”, context: {count: {number: ‘other’}, user: {gender: ‘female’}} ] By Context
  • 53. Possessive Case Michael liked Anna’s post “{actor} liked {target::pos} post”
  • 54. Dative Case Михаилу нравистся пост Анны “{actor::dat} нравится пост {target::gen}”
  • 55. Ordinals This is your 2nd reminder ‘This is your {count::ord} reminder'
  • 56. {date} = ‘{month_name} {days}, {years}’ Dates English Date Format tr('{user} was born on {date}', {user: user, date: user.birthday.tr(:verbose)}) %B = {month_name} %d = {days} %Y = {years} Alex was born on July 4, 2002 verbose = ‘%B %d, %Y’ #July 4, 2002
  • 57. Dates Russian Date Format Alex родился 4 Июля, 2002 “{user || родился, родилась} {date::gen}” ‘%d %B, %Y’ #4 Июль, 2002 {date} = ‘{days} {month_name}, {years}’
  • 58. tr('[link: {user}] completed [bold: {count || mile}] on {user | his, her} last run.',{ user: [user, :name], count: 3, link: {href: ‘/profile’} }) Mixing it all together Michael completed 3 miles on his last run.
  • 59. Mixing it all together Russian Translation Michael пробежал 3 мили в своем последнем забеге. '[link: {user}] {user | пробежал, пробежала} [bold: {count || милю, мили, миль}] в своем последнем забеге.'
  • 60. DEMO
  • 61. Framework Support Translations can be shared across multiple platforms and frameworks.
  • 63. ● Translations should be reusable across multiple projects ● Each translation key can have many translation options for a language based on context ● Translation keys and translations are unique and are only stored once in the entire system What is UTM?
  • 64. Translation Rankings ● Ranks are derived from user input ● Translators have ranks and voting powers that change based on their input and acceptable translations ● Translation usability score is derived from how often the translation has been locked in other projects ¡Hola Mundo! hola mundo! Hello Mundo Hola World Yo Mundo! Que Paso, Mundo? @!*#& +45 +2 -2 -17 -55 -58 -99 Hello World!
  • 65. +45 +22 +1 -99 Translator Rankings Translators have ranks and voting powers that change based on their input and acceptable translations. Jenny Smith Admin Jeremy Swanson Proofreader Jessica Sawyer Translator Jake Stephens Translator
  • 66. Hello World Hola Mundo 안녕하세요 Привет Мир Hallo Welt ‫עולם‬ ‫שלום‬ 你好,世界 UTM Graph
  • 68. Resources SDKs https://github.com/translationexchange Documentation http://translationexchange.com/docs Blog http://blog.translationexchange.com Sample App https://github.com/translationexchange/tml-rails-samples-foody Live Sample App http://foody.translationexchange.com Facebook https://www.facebook.com/translationexchange Twitter @translationx Feedback feedback@translationexchange.com