问题描述:

Using Base Internationalization, It's become really easy to produce automatic localizations based on Object ID. Here's a french version of something.

/* Class = "IBUILabel"; text = "Clear Memory"; ObjectID = "fHm-5n-KrF"; */

"fHm-5n-KrF.text" = "Effacer la mémoire";

But that only extends to things that Xcode can find in the storyboard.

It should be possible to include text strings in an AlertView. Surely.

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Wheel Cicumference" message:@"Ground Trace (mm):" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];

alert.alertViewStyle = UIAlertViewStylePlainTextInput;

alert.tag = 10;

[alert addButtonWithTitle:@"Accept"];

[alert show];

Apple docs are vast, and I haven't found anything meaningful so far. I don't necessarily wan't the answer laid out in full for me, Just set me off in the general direction

网友答案:

The only way i know to localize the UIAlert is the following:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error")
                     message:NSLocalizedString(message, message) delegate:nil
                      cancelButtonTitle:NSLocalizedString(@"OK", @"OK") otherButtonTitles:nil];
相关阅读:
Top