Date post: | 15-Apr-2017 |
Category: |
Technology |
Upload: | michael-berkovich |
View: | 96 times |
Download: | 0 times |
translationexchange.com
Powered by Translation Exchange
Translation Markup Language for Ruby on Rails
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 .xmlApple .stringsApple .plistGettext .poGettext .potJava .properties Java .xmlMicrosoft .resxMicrosoft .reswMicrosoft .resjsonMicrosoft .aspx
FILE FORMATSLots of translation
Microsoft .rcPHP .iniPHP .confBabel Flash .xmlBlackberry .rrcNSIS .inshQT Linguist .tsLatex .latexDocbook .dbkTBX .tbxTMX .tmx
XLIFF .xliffYouTube .sbvRails YAML .yamlSubtitles .srtMicroDVD .subSubviewer .subMozilla Web L10NText .txtCSV SpreadsheetExcel SpreadsheetWord 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
BOTTLENECKFile 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 itBETTER FOR EVERYONE
What would an ideal solution look like?
● ConsistencyProvide tools that offer a clear and
consistent way for internationalizing
content across all frameworks
● AdaptabilityTools must be extensible and adaptable
and should be able to solve any arising
internationalization and localization
problem
● ContextualizationAllow translators to translate in context
from within the application
● AgilityKeep 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 CDNLocal Cache
Application with SDK
A Better WayA truly automated and continuous localization
Translation Cachingstatic and dynamic cache adapters for storing translations in your application
Inline Translation ToolsTranslation can be done in context of the application
Access Professional TranslatorsConnect your application to thousands of professional translators around the world
Open Sourceall SDKs are available on github
Multiple Platformssupport for Rails, Node, PHP, Python, iOS, Android and more
Universal Translation MemoryTranslations 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 LanguageDeveloper 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 LanguageDescription & Context
Hello Michael
translationexchange.com
Translation Markup LanguageData Tokens & Interpolation
<%= tr('Hello {name}', {name:'Michael'}) %>
Hello Michael
<%= tr('Hello [bold: {user}]', { user: current_user
}) %>
translationexchange.com
Translation Markup LanguageDecoration Tokens
Hello Michael
<%= tr('Hello <strong>{user}</strong>', { user: current_user }) %>
translationexchange.com
Translation Markup LanguageDecoration Tokens
Hello Michael
<%= tr('Hello [bold: {user}]', { user: current_user,
bold: '<strong>{$0}</strong>' }) %>
translationexchange.com
Translation Markup LanguageDecoration Tokens
You have 5 messages
<%= tr(You have {count || message}', { count: 5
}) %>
translationexchange.com
Translation Markup LanguagePluralization
Michael uploaded 3 photos
<%= tr('{user} uploaded {count || photo}', { user: current_user, count: 3 }) %>
translationexchange.com
Translation Markup LanguagePluralization
Michael liked Anna’s post
<%= tr('{actor} liked {target::pos} post', { actor: current_user, target: other_user }) %>
translationexchange.com
Translation Markup LanguageLanguage Cases
This is your second warning
<%= tr(This is your {count::ord} warning', { count: 2}) %>
translationexchange.com
Translation Markup LanguageLanguage 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 Translationprovided by Google, Microsoft and Yandex. Translations are ranked to get the best result.
Crowdsourced TranslationSome developers may choose to use their own users to translate their content, similar to how Facebook and Twitter translated their sites.
Professional TranslationOrder are received and processed by our partners and are made available in our system within hours.
Caching Options
translationexchange.com
Static CacheFile 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 CacheRedis, 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/translationexchangeDocumentation http://translationexchange.com/docsBlog http://blog.translationexchange.comFoody Source https://github.com/translationexchange/tml-rails-samples-foodyFoody Live http://foody.translationexchange.comFacebook https://www.facebook.com/translationexchangeTwitter @translationxFeedback [email protected]
translationexchange.com
Resources
Thank YouFind out more at translationexchange.com
translationexchange.com