0

I am trying to Localize my app...

I have set the following in ViewController.m

//Lets Play Button
CGRect Play = CGRectMake(self.view.frame.size.width/2-100, self.view.frame.size.height-280, 200, 60);
HTPressableButton *start = [[HTPressableButton alloc] initWithFrame:Play buttonStyle:HTPressableButtonStyleRounded];
start.buttonColor = [UIColor colorWithRed:236/255.0f green:101/255.0f blue:128/255.0f alpha:1.0f];
start.shadowHeight = 0;
start.titleLabel.font = [UIFont fontWithName:@"Intro" size:25];
[start setTitle:NSLocalizedString(@"LetsPlay", nil) forState:UIControlStateNormal];
[start addTarget:self action:@selector(playButtonHandler:) forControlEvents:UIControlEventTouchUpInside];
[newMain addSubview:start];

and set the following in Localizable.strings (This is the Spanish Version)

"LetsPlay"="Beunos Noches!";
"Menu"="Adios!";

But the button is showing the text as 'LetsPlay'

So it is as if the NSLocalizedString(@"LetsPlay") commmand is not working...

Any ideas?

Leo
  • 24,596
  • 11
  • 71
  • 92
Phil Nind
  • 341
  • 1
  • 4
  • 16
  • Do you run your project in a Spanish language iOS? Because,I checked what you post,it just runs well on my Mac – Leo Jun 07 '15 at 12:07
  • Yeah I went into settings on the Simulator and changed it to spanish ? Unless there is another way ? – Phil Nind Jun 07 '15 at 13:27

1 Answers1

0

Turns out it was working but the simulator has a few teething problems with Localization.

Found the answer here - XCode 5/iOS 7 - localization not working in simulator

Community
  • 1
  • 1
Phil Nind
  • 341
  • 1
  • 4
  • 16