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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to