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

Internationalization Done Right

Internationalization Done Right

In this presentation I introduce the concept of internationalization, localization, and their benefits. By highlighting how culture influences the user’s behaviour, I explain why we need to do more than just “making things translatable”.

I18N has a massive impact on user acceptance and usability. I show existing tools, interfaces, and best practices to get internationalization and localization right in the UIs we create and the code we write.

5253258c79d25b02f51e0ac55e30cf69?s=128

Pascal Birchler

May 13, 2017
Tweet

Transcript

  1. Internationalization Done Right

  2. Pascal Birchler
 @swissspidy

  3. Why Internationalization?

  4. None
  5. Why Internationalization?

  6. The process of creating a product in such a way

    that it can be easily adapted to specific local languages and cultures Internationalization
  7. The process of adapting a product or service to a

    particular language, culture, and desired local “look-and-feel.” Localization
  8. “Localization is like translation but with a cultural twist” Localization

  9. I18N L10N

  10. Locales

  11. Locale ≠ Language

  12. Flag ≠ Language

  13. None
  14. flagsarenotlanguages.com

  15. Dates

  16. DD/MM/YYYY MM/DD/YYYY YYYY-MM-DD

  17. None
  18. 12/05/2017

  19. None
  20. None
  21. Numbers

  22. 123 456.99 123,456.99 123’456.99 123.456,99

  23. Right to Left Icons Symbols Puns Jokes Legal Currencies Numbers

    Formal/Informal Support Units
  24. Dealing with Locales

  25. Locale Detection

  26. Accept-Language: es, en-gb;q=0.8, en;q=0.7

  27. Internationalization in User Interfaces

  28. Symbols ✅ ⭕

  29. Personal Names

  30. David Lloyd George

  31. Agüero Alcázar Almarez Ancheta del

  32. Implications for Field Design

  33. None
  34. None
  35. None
  36. None
  37. Fonts

  38. None
  39. Left-to-Right Right-to-Left

  40. None
  41. None
  42. None
  43. Internationalization in Development

  44. None
  45. String Extraction

  46. function translateIt( $str ) { // Do something. } __(

    'Foo' ); // ✓ translateIt( 'Bar' ); // ☓ __( 'Baz' ); // ✓
  47. $foo = 'Hello World'; __( $foo ); // ☓

  48. String Concatenation

  49. echo $num . ' ' . __( 'items' )

  50. Plural Forms

  51. printf( __( '%d items' ), $num )

  52. if ( $num == 1 ) printf( __( '%d item'

    ), $num ) else printf( __( '%d items' ), $num )
  53. printf( _n( '%d item', '%d items', $num ), $num )

  54. printf(_n('%d item', '%d items', 1), 1) printf(_n('%d item', '%d items',

    2), 2) printf(_n('%d item', '%d items', 5), 5)
  55. Context

  56. _x('Update', 'verb' ) _x('Update', 'noun' )

  57. Dates & Units

  58. Resources

  59. Documentation

  60. Localization Management

  61. w3.org/internationalization

  62. cldr.unicode.org

  63. developer.wordpress.org

  64. To Sum Things Up

  65. 1. Don’t make assumptions 2. Understand cultural values 3. i18n

    from the beginning 4. Don’t reinvent the wheel
  66. One Last Thing…

  67. WordCamp Bern, Switzerland September 9, 2017

  68. ¡Gracias! Eskerrik asko!