Reputation: 1773
This is the first time that I have attempted to add some localization into an app using Localizable.strings files and I am experiencing an unexpected issue with it. For clarity, these are the steps I have gone through.
As an example, this is one of the localizations I am trying to add.
"CAMERA_ERROR" = "The device does not have a camera";
I am added the exact same string in the Spanish .strings file, but changing the text to suit Spanish. Within my app code I am using the following:
NSString *cameraError = NSLocalizedString(@"CAMERA_ERROR", nil);
Everything seems fine up until this point, but this is where it gets weird and I get confused. If I run the app on one of my iMacs it works fine and depending on what language I set the simulator to it displays the correct English or Spanish string.
However, when I run the exact same app on this MacBook Pro it doesn't display the string, it instead takes the "KEY" title and displays that. So instead of showing the message as "The device does not have a camera" it shows it as "CAMERA_ERROR". The code is exactly the same as it is the same project cloned from a git repo.
Can anyone shed any light on this? Any setting on the MacBook that could be different?
Upvotes: 0
Views: 789
Reputation: 69047
Try doing the following on your MacBook Pro:
clean the project;
remove the app from the simulator/device;
rebuild the app.
This should fix it.
Upvotes: 6