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.

9455cf8cef7162321b21a354d27f6dba?s=128

Kristina Fox

May 27, 2019
Tweet

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
  2. @KRSTNFX KRISTINA.IO hi, I’m Kristina ⛸

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

  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
  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
  6. @KRSTNFX KRISTINA.IO different languages

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

  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
  9. @KRSTNFX KRISTINA.IO regional peculiarities

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

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

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

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

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

  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
  16. @KRSTNFX KRISTINA.IO technical requirements String formatters UI constraints Currency formatters

    Timezones Animations Right-to-left languages Testing Accessibility
  17. U S E R R E S E A R

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

  19. @KRSTNFX KRISTINA.IO

  20. @KRSTNFX KRISTINA.IO

  21. @KRSTNFX KRISTINA.IO What people say they do and what they

    actually do is usually different
  22. @KRSTNFX KRISTINA.IO

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

  24. @KRSTNFX KRISTINA.IO tester questionnaire - Current vs. new user -

    Demographic (age, gender, etc.) - Lifestyle - Experience in your field
  25. L O C A L I Z A T I

    O N
  26. @KRSTNFX KRISTINA.IO process $

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

  28. @KRSTNFX KRISTINA.IO let str = String.localizedStringWithFormat( NSLocalizedString("%d songs played", comment:

    “[count] songs played“), numSongsPlayed) localize your plural strings
  29. @KRSTNFX KRISTINA.IO localize your plural strings <key>NSStringLocalizedFormatKey</key> ... <dict> <key>NSStringFormatSpecTypeKey</key>

    <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>d</string> <key>one</key> <string>%d song played</string> <key>other</key> <string>%d songs played</string> </dict>
  30. @KRSTNFX KRISTINA.IO finding non-localized strings

  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
  32. @KRSTNFX KRISTINA.IO changing locales and timezones NSLocale.currentLocaleDidChangeNotification NSNotification.Name.NSSystemTimeZoneDidChange

  33. A R C H I T E C T I

    N G Y O U R C O D E
  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") }
  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") }
  36. @KRSTNFX KRISTINA.IO global manager

  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") } }
  38. @KRSTNFX KRISTINA.IO global manager versus

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

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

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

  42. @KRSTNFX KRISTINA.IO localized images and animations

  43. @KRSTNFX KRISTINA.IO localized images and animations

  44. @KRSTNFX KRISTINA.IO UIView.transition ( with: titleLabel, duration: 0.5, options: .transitionFlipFromTop,

    animations: { self.titleLabel.text = self.titleStringArray[self.titleCounter] }, completion: nil )
  45. T E S T I N G

  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
  47. @KRSTNFX KRISTINA.IO pseudolanguages

  48. @KRSTNFX KRISTINA.IO

  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
  50. @KRSTNFX KRISTINA.IO North America First market Europe Low numbers, high

    growth Asia Low numbers, low potential app growth
  51. @KRSTNFX KRISTINA.IO things to consider - Product performance - Time

    and effort spent developing and testing in low performing locales
  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
  53. 1 2 3 4 User research Localization Architecting your code

    Handling UI Testing Weighing cost and benefits 5 6 internationalization
  54. T H A N K Y O U @KRSTNFX |

    KRISTINA.IO