Hi everybody! NOOB here. I've looked through these forums for issues similar to mine, but didn't see anything. Hoping somebody out there can help me.
Here is my problem. I have an app that I am adding localization to. I have 3 files (en, es, fr) created with a number of keys and values in each.
So, I run my app in the simulator...and everything works fine. I can see the expected text for each of my keys. However, if I quit the simulator...and run my app again, ONE of my key values is wrong (displays all kinds of crazy things, not the Key name or text)...or the app crashes when I call the NSLocalizedString() function for this specific key. I put in an entry for NSLog in my AppDelegate file, and the value is ok here. I also put in an entry in my data loading function, and the value is ok here as well. But if I put the same entry in the viewDidLoad function where I am using it, it crashes. Can anybody help explain what might be going on here? Is it possible that this key is somehow being released? How can it be that it works fine the first time through the simulator, but not the next? And why does it only happen to one of my localized strings? Any help would be much appreciated.
The key in all 3 of my files looks like:
"AKeyThatDoesNotWork" = "My Text Here";
and my call that causes the incorrect text to show, or the app to crash:
NSLocalizedString(@"AKeyThatDoesNotWork", @"")
Here is my problem. I have an app that I am adding localization to. I have 3 files (en, es, fr) created with a number of keys and values in each.
So, I run my app in the simulator...and everything works fine. I can see the expected text for each of my keys. However, if I quit the simulator...and run my app again, ONE of my key values is wrong (displays all kinds of crazy things, not the Key name or text)...or the app crashes when I call the NSLocalizedString() function for this specific key. I put in an entry for NSLog in my AppDelegate file, and the value is ok here. I also put in an entry in my data loading function, and the value is ok here as well. But if I put the same entry in the viewDidLoad function where I am using it, it crashes. Can anybody help explain what might be going on here? Is it possible that this key is somehow being released? How can it be that it works fine the first time through the simulator, but not the next? And why does it only happen to one of my localized strings? Any help would be much appreciated.
The key in all 3 of my files looks like:
"AKeyThatDoesNotWork" = "My Text Here";
and my call that causes the incorrect text to show, or the app to crash:
NSLocalizedString(@"AKeyThatDoesNotWork", @"")