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

Internationalizing Your App

Internationalizing Your App

This talk explores how to make your iOS app global ready and does a brief overview of what internationalization is, some technical tools and tricks you can use to build your app for different languages and cultures, and considers the business side of things if you ever have to sunset your product.

Debuted at UIKonf in Berlin, Germany in May 2019.

Kristina Fox

May 27, 2019
Tweet

More Decks by Kristina Fox

Other Decks in Technology

Transcript

  1. I N T E R N A T I O N A L I Z I N G
    Y O U R A P P
    KRISTINA FOX | SENIOR IOS ENGINEER | INTUIT
    @KRSTNFX
    KRISTINA.IO

    View Slide

  2. @KRSTNFX
    KRISTINA.IO
    hi, I’m Kristina

    View Slide

  3. @KRSTNFX
    KRISTINA.IO
    itunes.apple.com/us/app/quickbooks-self-employed/id898076976

    View Slide

  4. D E F I N I N G
    I N T E R N A T I O N A L I Z A T I O N

    View Slide

  5. @KRSTNFX
    KRISTINA.IO
    A means of adapting computer software to
    in·ter·na·tion·al·i·za·tion
    and
    ,
    different languages regional peculiarities
    technical requirements of a target locale

    View Slide

  6. @KRSTNFX
    KRISTINA.IO
    different languages

    View Slide

  7. @KRSTNFX
    KRISTINA.IO
    https://www.tripsavvy.com/common-temperatures-in-celsius-and-fahrenheit-1481686
    different languages

    View Slide

  8. @KRSTNFX
    KRISTINA.IO
    A means of adapting computer software to
    in·ter·na·tion·al·i·za·tion
    and
    ,
    different languages regional peculiarities
    technical requirements of a target locale

    View Slide

  9. @KRSTNFX
    KRISTINA.IO
    regional peculiarities

    View Slide

  10. @KRSTNFX
    KRISTINA.IO
    regional peculiarities
    https://twitter.com/Mantia/status/1112004160998666240

    View Slide

  11. @KRSTNFX
    KRISTINA.IO
    regional peculiarities
    https://twitter.com/Mantia/status/1112004160998666240

    View Slide

  12. @KRSTNFX
    KRISTINA.IO
    regional peculiarities
    https://twitter.com/steipete/status/1110247345185308672

    View Slide

  13. @KRSTNFX
    KRISTINA.IO
    regional peculiarities
    https://twitter.com/MrJre/status/1110248925552881667, https://twitter.com/aldoBonillaG/status/1110253379803074563

    View Slide

  14. @KRSTNFX
    KRISTINA.IO
    regional peculiarities
    https://sampi.co/successful-china-marketing-lessons-from-evernote/

    View Slide

  15. @KRSTNFX
    KRISTINA.IO
    A means of adapting computer software to
    in·ter·na·tion·al·i·za·tion
    and
    ,
    different languages regional peculiarities
    technical requirements of a target locale

    View Slide

  16. @KRSTNFX
    KRISTINA.IO
    technical requirements
    String formatters
    UI constraints
    Currency formatters
    Timezones
    Animations
    Right-to-left languages
    Testing
    Accessibility

    View Slide

  17. U S E R R E S E A R C H

    View Slide

  18. @KRSTNFX
    KRISTINA.IO
    in-depth user studies

    View Slide

  19. @KRSTNFX
    KRISTINA.IO

    View Slide

  20. @KRSTNFX
    KRISTINA.IO

    View Slide

  21. @KRSTNFX
    KRISTINA.IO
    What people say they do and what
    they actually do is usually different

    View Slide

  22. @KRSTNFX
    KRISTINA.IO

    View Slide

  23. @KRSTNFX
    KRISTINA.IO
    other alternatives
    Cultural consultants Virtual testers

    View Slide

  24. @KRSTNFX
    KRISTINA.IO
    tester questionnaire
    - Current vs. new user
    - Demographic (age, gender, etc.)
    - Lifestyle
    - Experience in your field

    View Slide

  25. L O C A L I Z A T I O N

    View Slide

  26. @KRSTNFX
    KRISTINA.IO
    process
    $



    View Slide

  27. @KRSTNFX
    KRISTINA.IO
    NSLocalizedString(“Hello world!”, comment: “greeting")
    localize your strings

    View Slide

  28. @KRSTNFX
    KRISTINA.IO
    let str = String.localizedStringWithFormat(
    NSLocalizedString("%d songs played", comment: “[count] songs played“),
    numSongsPlayed)
    localize your plural strings

    View Slide

  29. @KRSTNFX
    KRISTINA.IO
    localize your plural strings
    NSStringLocalizedFormatKey
    ...

    NSStringFormatSpecTypeKey
    NSStringPluralRuleType
    NSStringFormatValueTypeKey
    d
    one
    %d song played
    other
    %d songs played

    View Slide

  30. @KRSTNFX
    KRISTINA.IO
    finding non-localized strings

    View Slide

  31. @KRSTNFX
    KRISTINA.IO
    string and number formatters
    - Currency
    - Numbers (decimal point and comma markers)
    - Dates (short, medium and long length)
    - Quotes
    - Uppercase, lowercase and capitalization

    View Slide

  32. @KRSTNFX
    KRISTINA.IO
    changing locales and timezones
    NSLocale.currentLocaleDidChangeNotification
    NSNotification.Name.NSSystemTimeZoneDidChange

    View Slide

  33. A R C H I T E C T I N G Y O U R
    C O D E

    View Slide

  34. @KRSTNFX
    KRISTINA.IO
    simple conditionals
    let localeId = Locale.current.identifier

    if localeId == "en_US" {
    print("Hello America")
    } else if localeId == "de_DE" {
    print("Hallo Deutschland")
    }

    View Slide

  35. @KRSTNFX
    KRISTINA.IO
    simple conditionals
    Feature 1 Feature 2 Feature 3 Feature 4
    let localeId = Locale.current.identifier

    if localeId == "en_US" {
    print("Hello America")
    } else if localeId == "de_DE" {
    print("Hallo Deutschland")
    }
    let localeId = Locale.current.identifier

    if localeId == "en_US" {
    print("Hello America")
    } else if localeId == "de_DE" {
    print("Hallo Deutschland")
    }
    let localeId = Locale.current.identifier

    if localeId == "en_US" {
    print("Hello America")
    } else if localeId == "de_DE" {
    print("Hallo Deutschland")
    }
    let localeId = Locale.current.identifier

    if localeId == "en_US" {
    print("Hello America")
    } else if localeId == "de_DE" {
    print("Hallo Deutschland")
    }

    View Slide

  36. @KRSTNFX
    KRISTINA.IO
    global manager





    View Slide

  37. @KRSTNFX
    KRISTINA.IO
    global manager
    func getPostalCodeTitle(locale: Locales) -> String {
    switch locale {
    case .US:
    return NSLocalizedString("Zip code", comment: "postal code")
    case .UK , .AU:
    return NSLocalizedString("Postcode", comment: "postal code")
    case .CA:
    return NSLocalizedString("Postal code", comment: "postal code")
    }
    }

    View Slide

  38. @KRSTNFX
    KRISTINA.IO
    global manager


    versus

    View Slide

  39. H A N D L I N G U I

    View Slide

  40. @KRSTNFX
    KRISTINA.IO
    https://www.imore.com/ios-9-review

    View Slide

  41. @KRSTNFX
    KRISTINA.IO
    autolayout constraints
    https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/AnatomyofaConstraint.html

    View Slide

  42. @KRSTNFX
    KRISTINA.IO
    localized images and animations

    View Slide

  43. @KRSTNFX
    KRISTINA.IO
    localized images and animations

    View Slide

  44. @KRSTNFX
    KRISTINA.IO
    UIView.transition (
    with: titleLabel,
    duration: 0.5,
    options: .transitionFlipFromTop,
    animations: {
    self.titleLabel.text = self.titleStringArray[self.titleCounter]
    },
    completion: nil
    )

    View Slide

  45. T E S T I N G

    View Slide

  46. @KRSTNFX
    KRISTINA.IO
    // App code
    let button = UIButton()
    button.setTitle(NSLocalizedString("Save", comment: "Save"), for: .normal)
    button.accessibilityIdentifier = "saveButton"
    // UI test code
    let app = XCUIApplication()
    let button = app.buttons["saveButton"]
    XCTAssertTrue(button.exists)
    localized UI tests

    View Slide

  47. @KRSTNFX
    KRISTINA.IO
    pseudolanguages

    View Slide

  48. @KRSTNFX
    KRISTINA.IO

    View Slide

  49. W E I G H T I N G T H E C O S T S
    A N D B E N E F I T S

    View Slide

  50. @KRSTNFX
    KRISTINA.IO
    North America
    First market
    Europe
    Low numbers,
    high growth
    Asia
    Low numbers,
    low potential
    app growth

    View Slide

  51. @KRSTNFX
    KRISTINA.IO
    things to consider
    - Product performance
    - Time and effort spent developing and testing
    in low performing locales

    View Slide

  52. @KRSTNFX
    KRISTINA.IO
    things to do
    - Message your users way ahead of time
    - Pull the app out of the App Store first
    - Give users a way to backup their data
    - Shut down backend support

    View Slide

  53. 1 2
    3 4
    User research Localization
    Architecting your code Handling UI
    Testing Weighing cost and benefits
    5 6
    internationalization

    View Slide

  54. T H A N K Y O U
    @KRSTNFX | KRISTINA.IO

    View Slide