Search code examples
iosxcodelocalizationios-simulator

localizable.strings - works in simulator but not on device


I have a problem with my language. I only see the ID_String on my device for each entry defined with NSLocalizedString. All text/images etc. set in the storyborad are shown correctly. If I use the simulator everything is fine!

So, I would like to youse NSLocalizedString - to use the option to translate my app maybe later. At this time my app is in german only.

  • I use storybord option. In the options I set the Localization to Germany
  • I add a string file to my project, also with the german localization
  • all lines in this file looks like "OK_Button" = "OK";

In my project folder there is an de.lproj folder including the storybord, InfoPlist.strings and localizable.strings

The two stings are saved as UTF16. I open these files in TextWrangler and savend them again.

I search since a few days for the reason, but I dont see my problem. Have anyone an idear whats wrong, or whats missing in my code?


Solution

  • 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".