Re: Localization w/ parameters
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.