Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Complex translation workflow and formatting

Avatar for Tingan Ho Tingan Ho
November 21, 2014

Complex translation workflow and formatting

Supporting a multilingual application has been a difficult for a very long time and we are now in a brink of entering a new state where we can do it more easily. Data such as CLDR and technologies such ICU’s MessageFormat is unheard for most people. Yet they are used by global companies such as Google, IBM and Apple. These technologies is now included in a project I have been working on called L10ns(). In addition to solving complex translation formatting with the help of ICU’s MessageFormat and CLDR, L10ns also solves a very difficult workflow problem associated with translation. My session will focus on all the mayor problems in internationalizing applications and help people use efficient industry best practices and solutions and l10ns(http://l10ns.org) for producing multilingual applications.

Avatar for Tingan Ho

Tingan Ho

November 21, 2014

Other Decks in Technology

Transcript

  1. Structure of this talk • Demo of problem and solutions

    regarding i18n Two parts: • One part explaining complex translation formatting • Other part explaining i18n workflow Publish l10ns
  2. Part1: Complex translation formatting • CLDR and ICU’s messageformat •

    Plural formatting • Context based formatting • Number formatting • Date formatting
  3. Cons: Locale specific code block • Increased programmer dependecy from

    translator • Maintenance problem - remembering locale specific data
  4. CLDR • Data used for localizing strings • Maybe the

    largest locale data repository in the world • Used by Apple, Google, IBM Yahoo etc.
  5. CLDR - plural forms • Spoken English just have two

    defined plural forms namely, singular and plural. • CLDR defines up to six plural forms. Zero, one, two, few, many and other
  6. CLDR - plural forms examples • English: one, other. •

    Arabic: zero, one, two, few, many and other. • Chinese: other • French: one, other in French: plural form one = 0, 1
  7. ICU’s messageformat • ICU stands for International components for Unicode

    (written in C++ and Java) • ICU’s messageformat is a component in ICU for handling message strings
  8. Try to define a simpler syntax... using at least… •

    one variable(counter) • type of formatting • messages for each plural form
  9. X likes this conference • He likes this conference •

    She likes this conference • They likes this conference
  10. Manual sync • When you delete a key in source

    you need to delete it from storage. • When you add a key in your source you need to add it in your storage. • When you change a key in your source you need to change it in your storage.
  11. Auto sync • When you delete a key in source

    it will delete it from the storage • When you add a key in your source it will add it in your storage • When you change a key in your source it will migrate to the new key
  12. Auto sync work flow 1. Write your source code 2.

    Update translation keys 3. Translate 4. Compile your translations 5. Run your application
  13. Translator and programmer workflow 1. Try to always store the

    English translation, so they can relate to the English translation. 2. Let the translator learn about ICU’s messageformat. 3. Have a web translation interface where they can translate your strings.
  14. Anti pattern Don’t use English text as translation keys. Because

    you will have namespace issue and no future proof.