Loading a localized tiff file: how to?
Loading a localized tiff file: how to?
- Subject: Loading a localized tiff file: how to?
- From: Michèle Garoche <email@hidden>
- Date: Wed, 13 Mar 2002 08:22:45 +0100
Hello,
I'm trying to load an NSImage localized to French (the image is kind of
text saved as tiff, so I need localization for it).
In PB, I've imported both tiff's (one for English, the other for French
languages) within the resources folder.
In the project directory, one file is in the English.lproj, the other in
the French.lproj.
The image must be loaded in a customized NSView and composited with some
image already loaded.
In the custom controller class, I wrote in the
applicationDidFinishLaunching method:
if (![NSImage imageNamed: NSLocalizedString(@"Foo", @"")])
{
NSRunCriticalAlertPanel(NSLocalizedString(@"Sorry", @""),
NSLocalizedString(@"The foo image could not be found", @""),
NSLocalizedString(@"OK", @""), nil, nil);
}
else
{
[[NSImage imageNamed: NSLocalizedString(@"Foo", @"")]
setScalesWhenResized: YES];
[[NSImage imageNamed: NSLocalizedString(@"Foo", @"")] recache];
}
Then in the custom view class in the appropriate method:
[[NSImage imageNamed: NSLocalizedString(@"Foo", @"")] dissolveToPoint:
NSZeroPoint fraction: 0.5];
I've also added localized strings.
But the image which is loaded is the image in the English folder, not
the one in the French folder, though the system is set to French
language.
What am I doing wrong?
Michhle
_______________________________________________
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.