我想创建一个包含可用日历的表格视图。
…
var cells: [CLProperty.PropertyCell] = []
let calendars = [NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, NSCalendarIdentifierISO8601, NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, NSCalendarIdentifierRepublicOfChina]
for cal in calendars {
let co = NSCalendar(calendarIdentifier: cal)
let ll: String = … // method to obtain the localized calendar name
cells.append(CLProperty.PropertyCell(cellIdentifier: CLProperty.PropertyCellTypes.SimpleCell, propertyID: NSCalendar.Properties.Calendar, cellBehavior: .None, caption: ll, currentValue: co))
}
…
我无法找到合适的方法。我应该使用NSLocalizedString
吗?