• 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: Localization w/ parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization w/ parameters


  • Subject: Re: Localization w/ parameters
  • From: Chris Ridd <email@hidden>
  • Date: Sat, 04 Jan 2003 20:36:58 +0000

On 4/1/03 5:35 pm, Fridiric BLANC <email@hidden> wrote:

> Hi there & Thanks for your forthcoming answers :) !
>
> I wanted to use the "key-value" properties w/ parameters to localize
> parts of my app (in French).
> Ex. : "This folder contains %d items." = "Ce dossier contient %d
> iliments"
> I've looked at the Cocoa docs and only found Obj-C NSString's
> stringWithFormat: method to solve my problem. But, my app is written in
> Cocoa-Java and NSString is not present here!
> Have I to use JDK's capabilities here or is there a Cocoa alternative
> way (which I do prefer to learn) ?
>
> Thanks a lot for your answers again.
>
> Note: Please, don't tell me I should I've used Obj-C: I know and I
> would have chosen it if I were the one who had this initial choice to
> make

There's an NSLocalizedString macro available in Objective C which will do
exactly what you want, if you set up a Localizable.strings file. Cocoa for
Java is a mystery to me, but in Java NSBundle has a static localizedString
method that looks pretty similar.

Cheers,

Chris
_______________________________________________
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.

  • Follow-Ups:
    • Re: Localization w/ parameters
      • From: Frédéric BLANC <email@hidden>
References: 
 >Localization w/ parameters (From: Frédéric BLANC <email@hidden>)

  • Prev by Date: Re: Elegant way to eliminate large conditional?
  • Next by Date: Re: drawer toggle
  • Previous by thread: Localization w/ parameters
  • Next by thread: Re: Localization w/ parameters
  • Index(es):
    • Date
    • Thread