4

I've got:

-(IBAction)about {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"About", @"Title of AlertView")
                                                    message:@"App name \n© My  name \n2010"
                                                   delegate:self
                                          cancelButtonTitle:NSLocalizedString(@"Back", @"Cancel Button Title")
                                          otherButtonTitles:nil];
    [alert show];
    [alert release];
}

And in the Localizable.strings :

/* Title of AlertView */
"About" = "Über";
/* Cancel Button Title */
"Back" = "Zurück";

My problem: When the language is german it's german but when I change the language to english the alert view is still german

What's wrong?

Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
Leon
  • 417
  • 3
  • 11
  • 24

2 Answers2

32

If you use xCode 4 you will face with such problem. Try next steps:

  1. Remove application from device
  2. Select root node of project tree to get project's properties
  3. Select "Build Phases" tab
  4. Click "Add build phase" and select "Copy files"
  5. Select "Resources" in "Copy files" view
  6. Add Localizable.strings file
  7. Perform "Clean" for the project
  8. "Build and Run"
VictorT
  • 783
  • 10
  • 20
9

Make the Localizable.strings file localizable (click on it, press cmd+i and push the "Make file localizable" button) and add German and English localizations to it. Then write the German localization to the German version of the file and leave the English version like this:

/* Title of AlertView */
"About" = "About";
/* Cancel Button Title */
"Back" = "Back";
Knodel
  • 4,359
  • 8
  • 42
  • 66
  • 1
    Are you sure you have 2 files which look like these? http://grab.by/grabs/9de2f9e8f874eb23249a57acd5e74497.png – Knodel Nov 28 '10 at 15:19
  • Make sure that with the new localisation you have a "(Base)" file and a "()" file. Without the Base file it won't work and it will mixup the languages. – Leon Sep 26 '14 at 09:04