Is there a way to get a localized description of a shortcut like Ctrl+Z so that I get “Ctrl+Z” if the app runs on an English system and “Strg+Z” on a German system?
The VCL function ShortCutToText isn’t internationalized. The API function GetKeyNameText is a bit better but still not perfect: If one switches the regional settings of a German XP to English (US), it still produces German texts. Besides the results are in CAPITALS which is ugly.
Clarification: I know how I can replace ShortCutToText or the Smkc* resource strings with customized versions. But to use that I need the translated strings. And I would like to get these from the OS (or similar).
Update: It looks like Microsoft expects developers to do the translation on their own – see 2. in Associating a Menu Item with an Accelerator Key. Quote:
For example, to assign CTRL+O to the Open command on the File menu,
you modify the menu item’s caption so that it looks like this:Open\tCtrl+O
The menu item in the Menu editor is updated to reflect the new caption
as you type it.
Note that the shortcut is manually appended to the caption.
I’ll answer my own question so that I have something to accept: It looks like Microsoft expects developers to do the translation on their own – see 2. in Associating a Menu Item with an Accelerator Key. Quote:
Note that the shortcut is manually appended to the caption.