Delphi: How to localize description for a menu shortcut?
        Posted  
        
            by 
                Ulrich Gerhardt
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ulrich Gerhardt
        
        
        
        Published on 2011-01-05T13:39:41Z
        Indexed on 
            2011/01/15
            12:53 UTC
        
        
        Read the original article
        Hit count: 236
        
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.
© Stack Overflow or respective owner