• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Localizing hierarchical plist information?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localizing hierarchical plist information?


  • Subject: Localizing hierarchical plist information?
  • From: Gregory Weston <email@hidden>
  • Date: Sun, 20 Feb 2005 08:27:23 -0500

The standard way to provided localized versions of strings from the info.plist file is to also maintain an InfoPList.strings file that contains 'Key = "Value";' entries. The example given at <http://developer.apple.com/documentation/MacOSX/Conceptual/ BPRuntimeConfig/Concepts/ConfigFiles.html> shows the following:

For example, the TextEdit application has several keys that are displayed in the Finder and thus should be localized. Suppose your information property list file defines the following keys:
<key>NSHumanReadableCopyright</key>
<string>Copyright © 1995-2002, Apple Computer, Inc.,All Rights Reserved.</string>


The French localization for TextEdit then includes the following strings in the InfoPlist.strings file of its Contents/Resources/French.lproj directory:
NSHumanReadableCopyright = "Copyright © 1995-2002 Apple Computer Inc.\nTous droits réservés.";

This is all well and good, but what do I do about hierarchical information? In particular, when providing help for a prefPane you include in Info.plist an array of dictionaries which associate help topics with menu titles. Obviously, I'd like the menu titles to be localized. But how do I do that for this:


<key>NSPrefPaneHelpAnchors</key>
<array>
  <dict>
    <key>anchor</key>
    <string>my_help_root</string>
    <key>title</key>
    <string>My Product Help</string>
  </dict>
</array>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Problem with NSLineBreakByTruncatingMiddle under 10.2
  • Next by Date: Re: equivalent of the "X Selection" for cocoa apps?
  • Previous by thread: Re: combining strings with floats into an NSTextView
  • Next by thread: Notifying NSBrowser of changed contents
  • Index(es):
    • Date
    • Thread