Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / October 2005



Tip: Looking for answers? Try searching our database.

NSSavePanel not localized??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alexander Grau - 31 Oct 2005 11:21 GMT
Hello,

I've got a project where I use NSSavePanel for a Japanese GUI.
Unfortuneately, the text on the NSSavePanel is always in English even
running on OS X/Japanese ("Save", "Save as:", "New Folder", "Cancel",
"Save").

Is NSSavePanel not localized? (why?) or do I something wrong here?
How can I fix this?

Thanks for any hint!

  NSSavePanel *op = [NSSavePanel savePanel];
  int iResult;
  [op setCanChooseDirectories : NO ];
  [op setCanChooseFiles : YES ];

  TSTRING initialDir = NSStr(NSHomeDirectory());
  TSTRING s =
Cfg->GetRoot().GetGroup(_T("UIState")).GetString(_T("DiskImageDir")).GetValue();
  if (s != _T("")) initialDir = s;
  iResult = [ op runModalForDirectory: StrNS(initialDir)
file:@"DiskImage.PRI" types:[NSArray arrayWithObjects:@"PRI",nil]];
Michael Ash - 31 Oct 2005 11:41 GMT
> Hello,
>
[quoted text clipped - 5 lines]
> Is NSSavePanel not localized? (why?) or do I something wrong here?
> How can I fix this?

You say that you're running OS X/Japanese, but this doesn't really make
sense. Localization on OS X (aside from stuff like boot process messages
and the login window) is handled on purely a per-application basis. What's
more, every application has only a single localization, which is chosen
at startup based on the available lproj directories and the user's current
localization rankings as set in the International pane of System
Preferences.

The point of all this is, does your application actually have a
Japanese.lproj? If not, then your application won't choose a Japanese
localization, not even for system-provided stuff which has the
localization available.

Signature

Michael Ash
Rogue Amoeba Software

Alexander Grau - 31 Oct 2005 11:52 GMT
>>Hello,
>>
[quoted text clipped - 13 lines]
> localization rankings as set in the International pane of System
> Preferences.
Yes, I did not mention that we have a proprietary translation system (as
we ported C++ code to Mac with mixed Cocoa for the GUI). All strings are
assigned to GUI elements at runtime...

> The point of all this is, does your application actually have a
> Japanese.lproj? If not, then your application won't choose a Japanese
> localization, not even for system-provided stuff which has the
> localization available.
Oops, did not know this - you are right, there is no Japanese.lproj...
I'm sure that might solve this

Thanks Michael!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.