• 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
Re: How to use the .strings files from the code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use the .strings files from the code?


  • Subject: Re: How to use the .strings files from the code?
  • From: "Mark A. Stratman" <email@hidden>
  • Date: Mon, 12 Jul 2004 12:04:16 -0500

There's not a whole lot of code involved (fortunately ;)
Once you properly create the string tables and/or extra bundles, it's usually just a matter of calling one of the NSLocalizedString....() functions/macros to fetch the string.

NSString *stuff = NSLocalizedString(@"Stuff", @"Stuff"); // where the second argument (comment) is mostly arbitrary. See the documentation for how it's otherwise useful.

see: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Functions/FoundationFunctions.html for NSLocalizedString(key, comment) and friends.

see: http://developer.apple.com/documentation/MacOSX/Conceptual/ BPInternational/index.html for more details and better explanations.

hth
- mark

On Jul 12, 2004, at 8:45 AM, Mark Patterson wrote:

Hi,

I spent some time looking at the code on the apple developer site but found no clear examples of writing the code that uses the strings files for i18n. Can anyone point me at some good code examples and explanations?

Regards,

Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >How to use the .strings files from the code? (From: Mark Patterson <email@hidden>)

  • Prev by Date: readFromURL:url options: not working for me
  • Next by Date: Re: AppleScript create command
  • Previous by thread: How to use the .strings files from the code?
  • Next by thread: readFromURL:url options: not working for me
  • Index(es):
    • Date
    • Thread