• 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
Loading a localized tiff file: how to?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Loading a localized tiff file: how to?
      • From: Ondra Cada <email@hidden>
    • Re: Loading a localized tiff file: how to?
      • From: mmalcolm crawford <email@hidden>
    • Re: Loading a localized tiff file: how to?
      • From: Nick Müller <email@hidden>
  • Prev by Date: Re: preventWindowOrdering
  • Next by Date: Re: NSTabView Problems
  • Previous by thread: Eliminating NSTableView selection highlighting
  • Next by thread: Re: Loading a localized tiff file: how to?
  • Index(es):
    • Date
    • Thread