Question

I have settings.bundle in my application with a Root.plist that is localized correctly with

Strings Filename Root

enter image description here

Now I have another plist file called NewInfo. How can I localize it? When I use the same Strings Filename "Root" nothing happens.

Any ideas?

Was it helpful?

Solution

Edited answer:

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

OTHER TIPS

Find that file in your project, inside the Xcode. Select it and open the File Inspector (View -> Utilities -> Show File Inspector). You'll see Localization in there, just click the + button and add the language you wish.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top