Is there any way to use Localizable.strings with NSLocalizedString(@"KEY", @"") in xCode 4.5 for iOS6 like in older iOS5?
Here is my sample code:
In Localizable.strings
"KEY" = "Hello World!";
In .m script
NSString *tempString = NSLocalizedString(@"KEY", NULL);
NSLog(@"My String is: %@", tempString);
The log for iOS5.1 is: "My String is: Hello World!"
The log for iOS6 is: "My String is: KEY"
...I'm really going to become crazy! Where is my error?
Thanks a lot!!!
相关问题
- NSLocalizedString is it really working?
- CoreBluetooth - Can connectPeripheral be called mu
- Scroll view scrolling up & down on button click [d
- XCode's svn “abort trap: 6” message
- iOS 6 facebook sdk 3.1.1 login error
相关文章
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
- NSLocalizedString not defaulting to Base language
- UIActivity with no settings for Facebook
- NSAttributedString '\\n' ignored
- How to permanently remove xcuserdata under the pro
- I have a UICollectionView and i want to show an im
- Passing parameter to WCF function using Objective
- iOS BLE - How to keep app active in the background
Their is no need to create a new project and copy, just delete the localizable files, create it once again and you will be fine.
Change the language settings of simulator.
The localized strings in my current app still work in iO6. I typically just use NSLocalizedString(@"KEY", NULL); Are you sure yours is working properly for 5.1?
The only solution I have found is:
I really don't know where was the problem, but now all works again well as usual.
Look at answer for post: IOS String Localization stops working when adding additional localization
It works for me. Clean build + remove from simulator (or phone) fix the error.
I was missing a semi-colon at the end of a line in one of my string-files. The compiler didn't report it even when I cleaned the project at built it again. First after restarting XCode the error was reported and I could find it and fix it.