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

On Internationalization and Localization

On Internationalization and Localization

Reaching out to the local PHP community in Istanbul, I talked about the importance of internationalization (I18N) and localization (L10N) at PHPKonf.

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

In this presentation I show why English ≠ English, why you should not use flags for language switchers, and how you can implement I18N best practices in your development and design workflow.

Pascal Birchler

May 21, 2018

More Decks by Pascal Birchler

Other Decks in Technology


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

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

    particular language, culture, and desired local “look-and-feel.” Localization (L10N)
  3. Right to Left Icons Symbols Puns Timezones Legal Currencies Numbers

    Formal/Informal Support Units Idioms Temperature
  4. function translateIt( $str ) { // Do something. gettext( $str

    ); } gettext( 'Foo' ); ✅ translateIt( 'Bar' ); ❌ gettext( 'Baz' ); ✅
  5. if ( $num == 1 ) printf( __( '%d item'

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

    2), 2) printf(_n('%d item', '%d items', 5), 5)
  7. MessageFormatter::formatMessage( "en_US", "{gender, select, ". "female {She plays football}". "male

    {He plays football}". "other {They play football}". "}", ['gender' => 'female' ] )