Beginning iOS App Localization

Click here to load reader

download Beginning iOS App Localization

of 22

  • date post

    15-May-2015
  • Category

    Technology

  • view

    971
  • download

    2

Embed Size (px)

description

Slides from Kyle Davis's iOS App Localization presentation at the Houston iPhone Developer Meetup Group

Transcript of Beginning iOS App Localization

  • 1. !Kyle Davis, Head Geek BigSprockethttp://www.ickr.com/photos/56013895@N00/122872445Beginning iOS Localization

2. When Was My Last? My rst localized app. !Currently: Spanish, French, German (and, of course, English)http://whenwasmylast.com 3. Example Project - EventsSmall app, unlocalized Localize to English Localize to Spanish 4. Demo 5. Unlocalized Strings are hard-coded, and spread throughout the app System-localizable elements are in English, even when simulator is in Spanish 6. Preparing for Localization Use system items (UIBarButtonSystemItem, UIDatePicker, etc) Use Auto Layout Tell Xcode youll be localizing the project Use NSLocalizedString 7. NSLocalizedString Instead of @foo, use NSLocalizedString(@foo Looks for a string with the key foo in the le Localizable.strings, in the language folder If it doesnt exist, it looks in the Base folder If it doesnt exist there, it returns foo 8. Demo 9. Localized to English Auto Layout Added Localization in Project le Added NSLocalizedString macro Used genstrings to create base localization Ready for Translation 10. Personal Design Decisions No NIB localization Strings FactoryYou may decide to do things differently. 11. Language.lproj Any le with localized content .strings, .xib, html, text image, sound, video Standard le loaders understand it imageNamed: pathForResource:ofType: 12. Language Resources Friends Google Translate (sparingly, and only if you have to) Third party professional translators AppleGlot 13. Third Party Translators Apple maintains a list at http://developer.apple.com/internationalization iCanLocalize.com oneskyapp.com 14. AppleGlot http://developer.apple.com/internationalization Reads translation glossaries and substitutes text directly back into nib les Supports incremental translations I did not use it but Apple also supplies their glossaries, which are damn handy 15. Demo 16. Localized to Spanish Use language glossaries to nd translationsUse 3rd parties for things not covered by Apple alreadyUse date formatter templates for locale differencesUse InfoPlist.strings to localize app name 17. Almost There! App Store Metadata Description Screenshots Keywords 18. NSLocalizedStringFromTable NSLocalizedStringFromTable(@key, @table, @comment) Reads from table.strings Save time and money No need to have 3rd parties translate Apples text Reuse your tables on the next project 19. Tools I Didnt Cover ibtool - localize your nib les .stringsdict - rules-based handling of special cases, like plurals twine - x some of the broken parts of the process 20. Links Apple Internationalization resources http://developer.apple.com/internationalization Florian Kugler on string localization http://www.objc.io/issue-9/string-localization.html Ole Begemann on Automating Strings Extraction from Storyboards/Nibs http://tinyurl.com/mmxaeeq Twine https://github.com/mobiata/twine 21. Links Slide deck http://www.slideshare.net/bigsprocket/beginning-iosapp-localization Final project source http://github.com/bigsprocket/Localization When Was My Last? http://whenwasmylast.com/ 22. Kyle Davisinfo@bigsprocket.com @bigsprockethttp://textimage.uskyle@bigsprocket.com @kylebits