Localization of Cocoa-Xib for a Newbie
Localization of Cocoa-Xib for a Newbie
- Subject: Localization of Cocoa-Xib for a Newbie
- From: Roman Fischer <email@hidden>
- Date: Fri, 31 Oct 2008 13:17:50 +0100
Hi,
I want to try Localization of a XIB, but I have problems:
I have the following Equipment:
- MacOS 10.5.5
- MacOS is runnig in German
- System-Preference Languages are (in order): German, English,...
- XCode 3.1.1
I make the following steps:
1. I Make a new Cocoa-Application project
2. I open the English-MainMenue.xib (doubleclick in Xcode starts
Interfacebuilder) and put a label "my English text" into the window.
Save it, Close IB.
3. In XCode I use "Get Info" of the English-MainMenue.xib and add
Localization for German.
4. I open the English-MainMenue.xib (doubleclick in Xcode starts
Interfacebuilder). I use "Open Localization" to get to the German-
MainMenue.xib. Here I change the label to "my German text". Save it.
Close IB.
5. Build and run my application. Starting my App I get the label "my
English text", but my prefered language is German!!
Additional steps.
6. I create in the group Resources a File Localizable.strings. I write
into it:
"myHello" = "Englisch Hello";
7. In XCode I use "Get Info" of the Localizable.strings , use " make
Localizeable" and "add Localization " for German.
8. I change the content of the german Localizable.string to
"myHello" = "German Hallo";
9. I put the following line into my main.m:
NSLog(NSLocalizedString(@"myHello",nil));
10 I build and run my application again. The results are:
- in my application window there is still "my English text"
- but in the console window I found "German Hallo"!!!!
So it seems clear to me that my created application "knows" that it
should use the german localization, but it uses the wrong localization
of the XIB files.
Any clues about the mistake I made?
Regards
Roman Fischer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden