views:

58

answers:

1

Situation: I am starting XCode, creating a new project for the iPhone (view application) and loading the XIB file into the IB. I manipulate the view (adding a label with the string "hello"), save, build, run the application, everything is fine. Now i am localizing the XIB. What i do: right-click on the xib-file, adding the desired language and after that, i have two XIB files in my XCode. Looks absolut perfect, just as it is shown in my iPhone Programming book ("the big nerd ranch"). I do change the label in both XIBs to another string, lets say "good morning!".

Problem: Now i clean and rebuild the application - but it allways shows the old XIB-file, allways the string "hello". Even when i change the settings on the iphone to other languages, i allways get the "hello" string shown. But the XIB with "hello" does not exist in my xcode anywhere!

Any hints for me? It makes me go crazy - and i just hope that i am missing a simple thing.

I am using XCode 3.2.3 and SDK 4.0

Thanks a lot in advance!

A: 

There are a a few steps to follow, including:

  • ibtool --generate-strings-file Example.strings en.lpoj/Example.xib
  • genstrings -o en.lproj *.m
  • translating the resource file
  • ibtool --strings-file fr.lproj/Example.strings en.lproj/Example.xib –write fr.lproj/Example.xib
  • dragging the translated resource file to the project (in the exact right place).

Have a look at this iPhone localization tutorial for the full steps + screenshots.

ICanLocalize
Thanks for your help. Unfortunately it did not solve the problem. But: it helped me, locating the problem even more better. Even when i delete the XIB file in the example above (using xcode or the good old command-line) - the XIB file is still shown on the simulator. So the question is: How to get rid of the XIB? I was expecting an error during compilation time or during execution time - but nothing. Still showing the old XIB? But why? Any hints for me?
peace97
Ok - after thinking for 2-5 minutes, the point is the following: when not *deleting the app* on the iPhone-Simulator, the Simulator seems to hold the XIB-file. After deleting the application, i do get the expected runtime-error
peace97
Ok - that's it: i missed to delete the app on the iPhone-simulator. After localizing the App i had to delete it on the iPhone-simulator, than make a clean + build, and everything is fine.
peace97