Re: Localization w/ parameters
Re: Localization w/ parameters
- Subject: Re: Localization w/ parameters
- From: Frédéric BLANC <email@hidden>
- Date: Sun, 5 Jan 2003 03:17:14 +0100
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!
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.
Thanks a lot for your answer, but I knew what you told me: in Obj-C,
I've found the great doc about all that and this is what I explained in
my message. My question was mainly: "How can I get the behaviours
detailed in Obj-C's NSString for localizing strings in a
Cocoa-Java-based app?"
In fact, there is no way (or I haven't found any way) to do
localization with parameters in Cocoa-Java. To localize normal and
static Strings, you're right, there's all I need in NSBundle and this
is accessible from Java. But to transform a retrieved localized String
which needs injection of data (via the stringWithFormat: method in
Obj-C), I haven't access to this from Java (since this method is in
NSString and NSString is only available in Obj-C :( !)
Thanks anyway for your time,
- Fred
_______________________________________________
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.