0

Our app contains two Localizable files in en.lproj and in nl.lproj. The files are copied to the product. (Check the IPA.) When requesting the localized string with NSLocalizedString(@"input_dialog_title", nil) we get the key as a result. The Localizable file is visible in the XCode project tree and has the two localized versions.

Update: There is no old Localizable.strings file in the root of the IPA. I cleaned and rebuild the project. I even tried restarting XCode.

Update2: The locale is en_US. I tested both nl and en through the -AppleLanguages (xx) parameter.

Any ideas as to why this happens?

The contents of the string files are as follows. For the English version:

/* 
  Localizable.strings
  BINK Glaser

  Created by Alessandro Vermeulen on 31-07-13.
  Copyright (c) 2013 Alessandro Vermeulen. All rights reserved.
 */

"input_dialog_title" = "New Value";

And for the Dutch version:

/* 
  Localizable.strings
  BINK Glaser

  Created by Alessandro Vermeulen on 31-07-13.
  Copyright (c) 2013 Alessandro Vermeulen. All rights reserved.
*/

"input_dialog_title" = "Nieuwe waarde";
Alessandro Vermeulen
  • 1,321
  • 1
  • 9
  • 28
  • Does the IPA contain an old (empty) Localizable.strings file in the root directory? Usually this kind of thing can go back when you start from a non-localized file and localize it. The old file hangs around in the build products and .app until you do a clean build and remove it from the simulator/device. – Mike Weller Aug 01 '13 at 13:36
  • maybe a wrong localization is set, so the framework search for a nonexistent strings file. – Erhard Dinhobl Aug 01 '13 at 13:39
  • @MikeWeller There is no old Localizable.strings file in the root or anywhere else. – Alessandro Vermeulen Aug 01 '13 at 13:46
  • @MrQ.C. The locale for the english version is "en_US" so that should be okay, right? – Alessandro Vermeulen Aug 01 '13 at 13:47
  • are those Localizable.strings files added to the target? – Valent Richie Aug 01 '13 at 14:32
  • @verbumdei: What do you mean exactly? They are in the IPA and the target app/executable has the following rule listed: "Process: Localization string files; Using: CopyStringsFile". – Alessandro Vermeulen Aug 01 '13 at 14:55
  • I was facing the same issue few days ago, and i solved it by renaming the "super" `.strings` file. Also make sure the `Localizable.strings` files are added to the target as @verbumdei said before. – VaroX Jan 24 '14 at 08:41

0 Answers0