living in a multi-lingual world: internationalization in web and desktop applications
DESCRIPTION
Speaker: Lars TrieloffTRANSCRIPT
![Page 1: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/1.jpg)
i18n for Web 2.0Why and how to internationalize your Web 2.0
application
Lars Trieloff, Mindquarry
![Page 2: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/2.jpg)
Why internationalize?International audiences want localized user interfaces.
![Page 3: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/3.jpg)
Lars Trieloff• Entrepreneur, Blogger,
Open Source Coder
• Languages I understand:
• German, English
• Languages I do not understand:
• Mandarin, Hindi, Spanish, Arabic, Russian, Portuguese, Bengali, Malay, French, Japanese, Farsi, Urdu, Punjabi, Vietnamese, Tamil, Wu, Javanese, Turkish, Telugu, Korean, Marathi, Italian, Thai, cantonese, gujarati, polish, kannada, burmese (and all other)
![Page 4: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/4.jpg)
Do it yourself, or someone else will do it
![Page 5: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/5.jpg)
Do it yourself, or someone else will do it
![Page 6: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/6.jpg)
Do it yourself, or someone else will do it
![Page 7: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/7.jpg)
Do it yourself, or someone else will do it
![Page 8: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/8.jpg)
Do it yourself, or someone else will do it
![Page 9: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/9.jpg)
What is different in Web 2.0
internationalization?
![Page 10: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/10.jpg)
Web 2.0 internationalization
• Web sites become Web applications
• The Web as a platform
• This means:
• Internationalize your plain old Web site
• Internationalize your rich internet applications
• Javascript, Flash, Silverlight, and more to come
• Internationalize your desktop applications
![Page 11: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/11.jpg)
The internationalization problem is multiplied due to use of different technologies in Web
and rich internet applications as well as desktop applications
Challenge
![Page 12: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/12.jpg)
Solution
Consolidation of internationalization technology: Each technology has its own internationalization framework:
We need a common framework for all of them
![Page 13: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/13.jpg)
What to do
• Keep all internationalization data in one place
• Extract internationalization strings from application parts
• repeatedly
• automatically
• Let the applications pull the i18n strings
![Page 14: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/14.jpg)
What do do
Web application
source code
RIA source code
desktop application
source code
String Extractor
Localization Database
Translator
Translator
Web application
RIA
desktop application
Intermediate Format
Intermediate Converter
![Page 15: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/15.jpg)
ExampleHow we did it in Mindquarry
![Page 16: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/16.jpg)
Our technologyOur problem
• Web application framework: Apache Cocoon, with Cocoon i18n Transformer
• Rich internet application framework: Dojo Toolkit, with dojo.i18n.*
• Desktop client: Java and SWT, with Java Message Bundles
![Page 17: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/17.jpg)
Steps to consolidated i18n
1. Find a common i18n database format
2. Extract internationalizable content automatically
3. Attach applications to i18n database
![Page 18: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/18.jpg)
1. i18n database format
• QT Linguist .ts files• XML files, easy to process• QT Linguist is a good, easy-to-
use and free translation editor• Can be used by non-
programmers
![Page 19: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/19.jpg)
2. Automatic string extraction
• We have three types of source code: XML, Java and Javascript
• XML
• Ruby script parses all XML source code, finds internationalizable strings not yet in database and adds them
• Java and Javascript, similar with a more complex parser
![Page 20: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/20.jpg)
messages.ts (QT Linguist)
XSLT
messages_de.xml (Cocoon i18n)
Apache Cocoon
messages_de.xml (Cocoon i18n)
3.1. Attach Cocoon
• Apache Cocoon‘s internationalization databases are XML files
• Transformation via XSLT
• Multiple output files, one for each language
![Page 21: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/21.jpg)
messages.ts (QT Linguist)
XSLT
messages_de.xml (Cocoon i18n)
Apache Cocoon
messages_de.xml (Cocoon i18n)
messages_de.js (Dojo i18n)messages_de.js
(Dojo i18n)
Dojo Widget
3.2. Attach Dojo
• Dojo uses JSON as internationalization format
• Transformation via XSLT
• Handled dynamically via Cocoon
![Page 22: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/22.jpg)
messages.ts (QT Linguist)
Desktop Client
i18n Adapter
3.3. Attach Java
• Message Bundle Reader is overwritten
• Uses internationalization database directory
• Internationalization database is being distributed with desktop client
![Page 23: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/23.jpg)
How to get translations
![Page 24: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/24.jpg)
How to get translations
do it yourself
![Page 25: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/25.jpg)
How to get translations
do it yourself pay someone
¥
€
$
![Page 26: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/26.jpg)
How to get translations
do it yourself pay someone
¥
€
$
ask your users
![Page 27: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/27.jpg)
User-contributed internationalization
• The holy grail
• Build a community and website at the same time
• But hard to achieve
• Wikipedia
• Open Source projects
![Page 28: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/28.jpg)
User-contributed internationalization
• The holy grail
• Build a community and website at the same time
• But hard to achieve
• Wikipedia
• Open Source projects
![Page 29: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/29.jpg)
Build your own translation
websiteAllows users to sign-up,
contribute localization strings, costly, but allows for automatic post-processing, validation and
quality-control.
![Page 30: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/30.jpg)
Build your own translation
websiteAllows users to sign-up,
contribute localization strings, costly, but allows for automatic post-processing, validation and
quality-control.
![Page 31: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/31.jpg)
Build your own translation
websiteAllows users to sign-up,
contribute localization strings, costly, but allows for automatic post-processing, validation and
quality-control.
![Page 32: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/32.jpg)
Ad-hoc-translations: use
a wikiAllows users to contribute
localization strings without sign-up, easy to deploy, but requires
manual post-processing, validation and quality-control.
![Page 33: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/33.jpg)
Pootle: OSS for web-based translations
GPL-software, based on Python, works with .po or XLIFF,
integration with version control, basic project management, used
by 20+ open source projects
http://pootle.wordforge.org
![Page 34: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/34.jpg)
Pootle: OSS for web-based translations
GPL-software, based on Python, works with .po or XLIFF,
integration with version control, basic project management, used
by 20+ open source projects
http://pootle.wordforge.org
![Page 35: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/35.jpg)
More challenges in Web 2.0 internationalization
• User-generated content
• Rich Web design
• User-contributed translations
![Page 36: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/36.jpg)
User-generated content
• User-generated content is great
• But hard to translate
• But translating it increases network effects
• English speaking users benefit from content generated by German speaking users
• Is there a (partial) solution?
![Page 37: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/37.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 38: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/38.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 39: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/39.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 40: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/40.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 41: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/41.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 42: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/42.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 43: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/43.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 44: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/44.jpg)
Solution
• Structured Content
• Sometimes easier to translate
• ratings
• locations
• time & date
• Sometimes it is still hard
• tags
![Page 45: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/45.jpg)
Graphical text• Looks great
• But hard to internationalize
• can break calculated box sizes,
• re-creation necessary
• Do not do it
• unless you can do it right
• create dynamically on server
![Page 46: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/46.jpg)
Graphical text• Looks great
• But hard to internationalize
• can break calculated box sizes,
• re-creation necessary
• Do not do it
• unless you can do it right
• create dynamically on server
![Page 47: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/47.jpg)
Graphical text• Looks great
• But hard to internationalize
• can break calculated box sizes,
• re-creation necessary
• Do not do it
• unless you can do it right
• create dynamically on server
![Page 48: Living in a Multi-lingual World: Internationalization in Web and Desktop Applications](https://reader038.vdocuments.mx/reader038/viewer/2022103114/554fb49db4c9057b298b531a/html5/thumbnails/48.jpg)
Thank you very [email protected]
For more information, see my weblog athttp://weblogs.goshaky.com/weblog/lars