Xcode 5/iOS 7 - localization not working in simulator
Maybe you have run the app at some time where the file Localizable.strings
already existed but has not been localized yet. If this is the case, this unlocalized file still resides in the resources folder in the application bundle in the simulator (when you build an run a new version of your app in the simulator or in the device, unused files will not be deleted). This can lead to problems.
Try to delete the app completely from the simulator and build an run again.
Xcode 5 iOS 7 Simulator not loading Storyboard and making me crazy! (no Localization)
The problem here is you are using [[UITableViewCell alloc] init]
. This creates a generic UITableViewCell with all default properties. You need to use -dequeueReusableCellWithIdentifier:forIndexPath:
to create cells with all the custom properties you need.
The reason you want the table view to create new cells is that the table view knows how to create cells based on the prototype cell laid-out in the storyboard.
Hidden during the load of the table view from the storyboard are calls to -registerNib:forCellReuseIdentifier:
for all prototype cells defined in the table view. This tells the table view how to create a cell which looks like the prototype.
localizable.strings - works in simulator but not on device
One reason that something works on the simulator, but not on the device is that Max OS X uses case-insensitive file systems by default, but iOS uses a case-sensitive file system. Check to make sure that your case for the filename is "Localizable.strings"
.
xcode 5 localization failed
Resolved. The problem arose from the fact that I had installed on the simulator an old version of Localizable.strings file as indicated in the post here.
The strange thing is that I was pretty sure I deleted and restarted the app more times before I read that post, as it is a practice that I adopt often well aware of the behavior described in the post.
Edit:There was no need, as I thought, add the Base Localization
New localizations not recognized in Xcode
I found the answer and posting it for anyone else who'd ran into this...
What I missed was to add localizations to the project itself. To do this,
- select your project in the
File Navigator
. - Then, instead of selecting your target, select your projet.
- Add localiztions there. By doing so, Xcode will ask you what existing resource you want to localize. Any new language there will be available when creating other localizable resources.
Here's an Xcode image of what to look for:
What pointed me in the right direction is Apple documentation.
Image of the doc in case the link breaks:
Related Topics
Why Is Uiwebview Cangoback=No in iOS7
Apple Watch - Only Getting Data If App on Phone Is Active
Static VS Class as Class Variable/Method (Swift)
Get User Swiping Direction in Uipageviewcontroller
iOS 10 - App Crashes to Access Photo Library or Device Camera via Uiimagepickercontroller
Open iOS 11 Files App via Url Scheme or Some Other Way
Send an Email from My App Without Using Mfmailcomposeviewcontroller
How to Find Serial Number, Imei Number Using iOS Sdk
Learn About the Nsxmlparser in iOS
Dismiss a Parent Modal in Swiftui from a Navigationview
Uibarbuttonitem Custom View in Uinavigationbar
Uploads Using Backgroundsessionconfiguration and Nsurlsessionuploadtask Cause App to Crash
Dyld: Library Not Loaded for a Framework Within a Framework
Uitableview Pagination - Bottom Refresh to Load New Data in Swift