Cocoa App Localisation

1,148 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,148
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide










  • Cocoa App Localisation

    1. 1. Cocoa App Localisation Alan Harper @aussiegeek App Fission
    2. 2. Once upon a time • everyone spoke English App Fission
    3. 3. Parlez-vous français? • Obviously, we have a problem App Fission
    4. 4. It’s just a preference NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSArray *userLanguages = [defaults objectForKey:@"AppleLanguages"]; NSString *preferredLanguage = [userLanguages objectAtIndex:0]; // Result is @"en" App Fission
    5. 5. Let’s go • Create a new ‘InfoPlist.strings’ strings file • Get info, make localizable App Fission
    6. 6. App Name CFBundleDisplayName = "Allergènes"; App Fission
    7. 7. Je parle français App Fission
    8. 8. Other strings NSString *title = [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleDisplayName"]; self.navigationItem.title = title; App Fission
    9. 9. Xib localisation • Yes its possible • Some of us are just too classy for xibs App Fission
    10. 10. Links • Apple Internaionalisation guide: http://developer.apple.com/mac/library/ documentation/MacOSX/Conceptual/ BPInternational/BPInternational.html App Fission

    ×