出于国际化的目的,我尝试放入NSLocalizedString
一个数组。我有随机图片,其中包含与每张图片相关的信息。它适用于英语。不适用于宏,有什么问题?
- (void)showimage
{
int randomimages = arc4random() % 7+1;
self.rahmen.image = [UIImage imageNamed:[NSString stringWithFormat:@"%d.png",randomimages]];
/* text without the local.strings worked perferct
self.myStrings = [NSArray arrayWithObjects:
@" info 0, nothing",
@" info 1 english",
@" info 2 english",
@" info 3 english",
@" info 4 english",
@" info 5 english",
@" info 6 english",
@" inf0 7 different english",nil];
*/
//here I wanted to put the different strings for internationalzation
self.myStrings = [NSArray arrayWithObjects: NSLocalizedString
(@"info0",
@"info1",
@"info2",
@"info3",
@"info4",
@"info5",
@"info6",
@"info7",nil)
];
label.text=[self.myStrings objectAtIndex:randomimages];
}