문제

I have a lot of troubles adding into my Root.plist a Child Pane. I've seen the same question HERE, but I can't solve it with those answers. Sorry for repeat similar questions.

This is a capture of Root.plist: Root.plist

And here is a capture of Connection.plist: Connection.plist

What I do, step by step is:

1.- Create a new Property List named "Connection.plist"

2.- As the new property list is out of my Settings.bundle, I add it as I've seen HERE. (Note: I've also tried without the second step, I mean, with the property list out of the Settings.bundle).

3.- Edit Root.plist adding a new item with type "Child Pane" and Filename "Connection".

That's all, I think these steps should have worked, but I can't see the new property list. It's like if Root.plist doesn't recognize Connection.plist...

I don't know what i'm doing wrong, i've followed a lot of tutorials and video-tutorials... nothing worked...

Thanks a lot!! Cheers, Jorge.

도움이 되었습니까?

해결책

The only way I have found to localize your second child pane plist file in the settings bundle is to do it by hand.

I have just tested this and it works:

When you open the Settings.bundle in Finder, in each language.lproj folder, make a copy of the Root.strings file and rename them to NewInfo.strings (for example).

Once you have one this, you should see in Xcode that there are these new string files inside your settings bundle.

Now in your NewInfo.plist file, make sure you have a field called StringsTable and set the value of that to NewInfo (or whatever you called your new strings file).

I have just tested this in Xcode 4.2 and the localization works perfectly:

Here is a screenshot of the Root.plist where I have added a "TEST" row to open child pane. Notice the other NewInfo.plist and the associated strings are in the correct lang.lproj folders (again, i put them there manually in Finder).

enter image description here Now here is the NewInfo.plist with the StringsTable key that corresponds to the associated .strings filename:

enter image description here

Here are the values of the strings files in FR and EN:

enter image description here

enter image description here

And the resulting settings page in the Simulator in both FR and EN, showing that the localization works:

enter image description here

enter image description here

enter image description here

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top