내 응용 프로그램은 2 개 언어로되어 있으며 하나는 영어이고 다른 하나는 스페인어입니다. 이제 서버에서 타임 스탬프를 받으면 "MMM dd, yyyy"형식으로 날짜를 표시해야합니다. 이것은 "Dec 23, 2017"입니다.하지만 스페인어로 변환하면 스페인어로 월 이름을 표시해야합니다. 약식으로 12 개월 이름을 스페인어로 지정 하시거나 NSDateFormatter에이 유형의 옵션이 있습니까? 당신이스페인어와 같은 특정 언어의 Nsdateformatter
NSDateFormatter * 포맷터 = [[NSDateFormatter의 ALLOC] 초기화]의 위치를 설정할 필요가 특정 언어에 대한
NSDate *date = [dateFormatter dateFromString:[[[webserviceDict valueForKey:@"CurrentWeekEarning"]objectAtIndex:i-1]valueForKey:@"date"]];
[dateFormatter setDateFormat:@"MMM dd, yyyy"];
strTitle = [NSString stringWithFormat:@"%@",[dateFormatter stringFromDate:date]];
확인'dateFormatter.locale' https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/InternationalizingLocaleData/InternationalizingLocaleData .html – Hackerman
날짜 형식 작성기를 작성하고 설정하는 방법을 보여주는 질문을 업데이트하십시오. – rmaddy