Localization by Ameir Al-Zoubi

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Localization by Ameir Al-Zoubi

Slides from @ameir's talk on Localization of iOS applications at CocoaHeads June 2012 in Raleigh, NC

Triangle Cocoa

June 30, 2012

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

18 slides
  1. Localizing Resources • Used to localize any resource (strings, images,

    xibs, etc) • Creates lproj folders to place resources • No additional code needed
  2. genstrings • Built in to Mac OS X • Automatically

    generate strings file • Creates key and comment
  3. Text Tips • Don’t overload keys • Be specific •

    Building strings • Making string plural • compare vs localizedStandardCompare • Direction • characterAtIndex & length are no good
  4. Dates & Time • Always use NSDateFormatter • Automatically uses

    current system settings • NSCurrentLocaleDidChangeNotification
  5. Numbers • NSNumberFormatter • Uses correct char set, decimal separator,

    currency, etc. • Other units you convert yourselves (lb vs kg, etc)
  6. Number Tips • Avoid stringWithFormat • New in iOS 6

    is localizedStringWithFormat • Parsing with NSNumberFormatter not intValue
  7. Localized Images • Can localize in Xcode like any other

    resource • If possible, avoid the need to localize • Avoid text • Use generic and stretchable images • Avoid word-play with images
  8. Finally • Its easy to prepare your app for localization

    even if you have no localized content yet • Be aware of other locales, languages and cultures • Use the Built-in APIs. They know what they’re doing!

More Decks by Triangle Cocoa

Other Decks in Programming