完璧にlocalizationをする方法をサーチ。iPhoneの設定でやるより自分のアプリ内でやりたいしね〜。ほぼ自分のため。iPhone自体は英語で使いたくて、ゲームは日本語でしたいのです。
Some helpful links:
http://www.iphonesdkarticles.com/2008/11/localizing-iphone-apps.html
http://www.bdunagan.com/2009/03/15/ibtool-localization-made-easy/
http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/Articles/InternatAndLocaliz.html#//apple_ref/doc/uid/20000277
To get what language the user is using:
ユーザーが何語を使ってるか:
NSArray *languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
NSString *currentLanguage = [languages objectAtIndex:0];
NSLog(@"Current Locale: %@", [[NSLocale currentLocale] localeIdentifier]);
NSLog(@"Current language: %@", currentLanguage);
NSLog(@"Welcome Text: %@", NSLocalizedString(@"TitleKey", @""));
No comments:
Post a Comment