저는 응용 프로그램 이름도 현지화하려는 iPad 앱이 있습니다. infoPlist.strings 파일을 추가하여이를 수행하는 방법을 알고 있습니다. (가정) 지금까지 러시아어와 영어 두 가지를 추가했습니다. 이제 러시아어 이름을 기본값으로 설정하려는 다른 질문이 있습니다. 만약 내가 프랑스를 선택하면 앱 이름은 러시아어, 러시아어는 러시아어, 영어이면 앱 이름 만 영어로 표시됩니다.infoPlist.strings (앱 이름)의 기본 언어를 설정할 수 있습니까?
자세한 정보가 필요한 경우 알려주십시오. 현재 아래 코드를 사용 중입니다.
NSUserDefaults *localeDefaults = [NSUserDefaults standardUserDefaults];
[localeDefaults removeObjectForKey:@"AppleLanguages"];
NSString *currentDeviceLanguage = [NSLocale preferredLanguages][0];
#ifdef DEBUG
NSLog(@"language:%@",currentDeviceLanguage);
#endif
if([currentDeviceLanguage isEqualToString:@"en"])
{
[localeDefaults setObject:@[@"en"] forKey:@"AppleLanguages"];
}
else
{
[localeDefaults setObject:@[@"fr"] forKey:@"AppleLanguages"];
}
[localeDefaults synchronize];
나도 그렇게 생각한다. 그러나 단지 확실하게하고 싶다. – harshalb