Localized Language Tutorial


/ Published in: Objective C
Save to your folder(s)

How to add multiple Language localization to an App.


Copy this code and paste it in your HTML
  1. - (void)applicationDidFinishLaunching:(UIApplication *)application {
  2.  
  3. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  4. NSArray *languages = [defaults objectForKey:@"AppleLanguages"];
  5. NSString *currentLanguage = [languages objectAtIndex:0];
  6.  
  7. NSLog(@"Current Locale: %@", [[NSLocale currentLocale] localeIdentifier]);
  8. NSLog(@"Current language: %@", currentLanguage);
  9. NSLog(@"Welcome Text: %@", NSLocalizedString(@"WelcomeKey", @""));
  10.  
  11. // Override point for customization after application launch
  12. [window makeKeyAndVisible];
  13. }

URL: http://www.iphonesdkarticles.com/2008/11/localizing-iphone-apps.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.