- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- (void)awakeFromNib
{
// ...
[[_contextMenu itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem1Caption", nil)];
[[_contextMenu itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem2Caption", nil)];
[[_contextMenu itemAtIndex:2] setTitle:NSLocalizedString(@"ContextMenuItem3Caption", nil)];
[[_contextMenu itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem4Caption", nil)];
[[_contextMenu itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem5Caption", nil)];
[[_contextMenu itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem6Caption", nil)];
[[_contextMenu itemAtIndex:6] setTitle:NSLocalizedString(@"ContextMenuItem7Caption", nil)];
[[_contextMenu itemAtIndex:8] setTitle:NSLocalizedString(@"ContextMenuItem8Caption", nil)];
[[_contextMenu itemAtIndex:10] setTitle:NSLocalizedString(@"ContextMenuItem9Caption", nil)];
[[_contextMenu itemAtIndex:11] setTitle:NSLocalizedString(@"ContextMenuItem10Caption", nil)];
[[_contextMenu itemAtIndex:13] setTitle:NSLocalizedString(@"ContextMenuItem11Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem11-1Caption", nil)]; // submenu notices
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem11-2Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:2] setTitle:NSLocalizedString(@"ContextMenuItem11-3Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem11-4Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem11-5Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem11-6Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:6] setTitle:NSLocalizedString(@"ContextMenuItem11-7Caption", nil)];
[[[[_contextMenu itemAtIndex:13] submenu] itemAtIndex:7] setTitle:NSLocalizedString(@"ContextMenuItem11-8Caption", nil)];
[[_contextMenu itemAtIndex:14] setTitle:NSLocalizedString(@"ContextMenuItem12Caption", nil)];
[[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem12-1Caption", nil)];
[[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem12-2Caption", nil)];
[[[[_contextMenu itemAtIndex:14] submenu] itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem12-3Caption", nil)];
[[_contextMenu itemAtIndex:16] setTitle:NSLocalizedString(@"ContextMenuItem13Caption", nil)];
[[_contextMenu itemAtIndex:17] setTitle:NSLocalizedString(@"ContextMenuItem14Caption", nil)];
[[_contextMenu itemAtIndex:18] setTitle:NSLocalizedString(@"ContextMenuItem15Caption", nil)];
[[_contextMenu itemAtIndex:19] setTitle:NSLocalizedString(@"ContextMenuItem16Caption", nil)];
[[_contextMenu itemAtIndex:20] setTitle:NSLocalizedString(@"ContextMenuItem17Caption", nil)];
[[_contextMenu itemAtIndex:21] setTitle:NSLocalizedString(@"ContextMenuItem18Caption", nil)];
[[_contextMenu2 itemAtIndex:0] setTitle:NSLocalizedString(@"ContextMenuItem1", nil)];
[[_contextMenu2 itemAtIndex:1] setTitle:NSLocalizedString(@"ContextMenuItem2", nil)];
[[_contextMenu2 itemAtIndex:3] setTitle:NSLocalizedString(@"ContextMenuItem3", nil)];
[[_contextMenu2 itemAtIndex:4] setTitle:NSLocalizedString(@"ContextMenuItem4", nil)];
[[_contextMenu2 itemAtIndex:5] setTitle:NSLocalizedString(@"ContextMenuItem5", nil)];
[[_contextMenu2 itemAtIndex:7] setTitle:NSLocalizedString(@"ContextMenuItem6", nil)];
[[_contextMenu2 itemAtIndex:8] setTitle:NSLocalizedString(@"ContextMenuItem7", nil)];
// ...
}
Метод локализации пунктов меню.
Весьма оригинальный.
emfs 25.08.2021 21:00 # 0