Xcode 5/iOS 7 - Localization Not Working in Simulator

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,

  1. select your project in the File Navigator.
  2. Then, instead of selecting your target, select your projet.
  3. 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:
Sample Image

What pointed me in the right direction is Apple documentation.

Image of the doc in case the link breaks:
Sample Image



Related Topics



Leave a reply



Submit