• 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
Getting Localized System Strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting Localized System Strings


  • Subject: Getting Localized System Strings
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 1 Apr 2008 11:52:28 +0200

Cocoa uses (automatically) localized strings. I would like to do the same.

E.g. using NSTextView and pasting a font, the Edit menu will suddenly show Undo "Paste Font".
If the same app is running with German as the preferred language, the Edit menu will contain Undo "Schrift einsetzen" (yes, the "Undo" also gets translated, but this does not interest me at this point).


When I override this mechanism, doing my own undo handling I have to use setActionName: "Paste Font".
But this is only correct if the current language is English.


So I have to do: setActionName: NSLocalizedStringFromTable( @"Paste Font", @"UndoStrings", @"setting font via menu Format → Font");

But this means that I have to create UndoStrings.strings files for about 15 languages, which is kind of tedious.
Also: If Apple decides that the correct translation for "Paste Font" should be "Schriftart einfügen" instead of "Schrift einsetzen", my app would look strange, using different words compared to all other apps.


So I want something like: NSLocalizedStringFrom_the_Table_used_by_the_System(..).
Or maby I could get at the official translations using NSDefaultManager?


These strings must be somewhere - so how to find them? Neither Spotlight nor grep seem to handle utf-16 files (like .strings).


Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting Localized System Strings
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: Question on bitmap fonts
  • Next by Date: Re: Getting Localized System Strings
  • Previous by thread: Re: Question on bitmap fonts
  • Next by thread: Re: Getting Localized System Strings
  • Index(es):
    • Date
    • Thread