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

Localizing your app. Traps and pitfalls by Roman Imankulov

Localizing your app. Traps and pitfalls by Roman Imankulov

Localizing your app. Traps and pitfalls

DevOpsPorto

August 08, 2019
Tweet

More Decks by DevOpsPorto

Other Decks in Programming

Transcript

  1. Localizing your app. 

    Traps and pitfalls
    Roman Imankulov

    View Slide

  2. About me
    • taking care of localizing todoist.com since 2012

    View Slide

  3. that’s how it looks like (18 languages in total)

    View Slide

  4. that’s how it looks like (18 languages in total)

    View Slide

  5. that’s how it looks like (18 languages in total)

    View Slide

  6. that’s how it looks like (18 languages in total)

    View Slide

  7. How to choose the language?

    View Slide

  8. Ask user!

    View Slide

  9. Get it from HTTP request

    View Slide

  10. Get it from the URL

    View Slide

  11. Get it from the URL

    View Slide

  12. Get it from the URL

    View Slide

  13. Confused search engines

    View Slide

  14. Use hreflang

    View Slide

  15. How translations are stored?

    View Slide

  16. View Slide

  17. How to use them in the code?

    View Slide

  18. View Slide

  19. Not touching the questions
    • How to seed translation files

    • How to extract strings from the code

    • How to work with translators

    • How to compile files

    • How to merge translations

    • etc…

    View Slide

  20. String interpolations

    View Slide

  21. Which one is correct?

    View Slide

  22. String interpolation 

    strikes back

    View Slide

  23. View Slide

  24. Try pofilter from translate-toolkit

    View Slide

  25. Plural forms

    View Slide

  26. Naive approach

    View Slide

  27. Plurals are complicated in Russian

    View Slide

  28. Arabic plurals
    Source: http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html

    View Slide

  29. ngettext to the rescue

    View Slide

  30. ngettext to the rescue

    View Slide

  31. More issues

    View Slide

  32. Order of words in a sentence
    _(“%s assigned %s tasks to %s”)
    _(“{user1} assigned {n} tasks to {user2}”)

    View Slide

  33. Gender variations
    _(“%s completed a task”)

    View Slide

  34. String concatenations
    _(“Welcome to”) + website_name

    View Slide

  35. Missing context
    _(“May”)
    pgettext(“month name”, “May”)
    pgettext(“availability”, “May”)

    View Slide

  36. And many many more

    View Slide

  37. What can we realistically do?
    • Brace yourself and get ready for failures

    • Use linters, automated tests, etc

    • Explain to developers how different languages work

    • Explain to translators how localization in the app works

    • Make sure there’s a communication channel between developers and
    translators

    • Make sure there’s a feedback channel from users to translators and
    developers

    View Slide