是否可以本地化EKSource的标题?

时间:2017-02-17 09:36:58

标签: ios localization calendar eventkit

有一个表格视图可以在我的应用程序中显示所有本机日历源标题和日历标题,这是我获取标题的代码:

    NSArray <EKSource *> *nativeCalendarEventSources = self.eventStore.sources
for (EKSource *ekSource in nativeCalendarEventSources)
        {
            NSSet<EKCalendar *> *ekCalendars = [ekSource calendarsForEntityType:EKEntityTypeEvent];

            // We import sources if it has non-zero calendars.
            if (ekCalendars.count)
            {
                NativeCalendarAccountSource *localSource = [NativeCalendarAccountSource findOrCreateWithIdentifier:ekSource.sourceIdentifier
                                                                                              managedObjectContext:context];
                localSource.title = ekSource.title;
                [sourcesToBeDeleted removeObject:localSource];
                for (EKCalendar *ekCalendar in ekCalendars)
                {
                    NativeCalendarAccount *localCalendarAccount = [NativeCalendarAccount findOrCreateWithIdentifier:ekCalendar.calendarIdentifier
                                                                                               managedObjectContext:context];
                    localCalendarAccount.title = ekCalendar.title;
                    localCalendarAccount.source = localSource;
                }
            }

但我发现标题:“其他”,“订阅的日历”未本地化, 我们有什么方法可以将它本地化吗?

0 个答案:

没有答案