我有一个大问题,我正在开发一个西班牙语的应用程序,因此标签和控件需要使用西班牙语。问题是当我从相机中选择一张照片时,默认相机控件有英文版:“拍照”,“取消”和“重拍”。我的问题是,如果我可以自定义这个按钮,使其显示为西班牙语:“Tomar Foto”,“Cancelar”和“Volver a tomar”。
这实际上是我的代码:
-(IBAction)takePhoto :(id)sender
{
if (fotos.count <= 3) {
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
[imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
}
imagePickerController.showsCameraControls = YES;
// image picker needs a delegate,
[imagePickerController setDelegate:(id)self];
// Place image picker on the screen
if([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0)
{
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self presentViewController:imagePickerController animated:NO completion:nil];
}];
}
else
{
[self presentViewController:imagePickerController animated:NO completion:nil];
}
}
}
答案 0 :(得分:0)
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@“de”,@“en”,@“fr”,nil] forKey:@“AppleLanguages”];
[[NSUserDefaults standardUserDefaults] synchronize]; //立即进行更改