/build/static/layout/Breadcrumb_cap_w.png

How to get the key name for HKCU\Software\Classes\Local Settings for the current user?

Different strings (translations) can be set/changed by accessing the STRING in HKCU\Software\Classes\Local Settings. Example: string for keyboard settings in control panel on my system HKEY_CURRENT_USER\Software\Classes\Local Settings\MuiCache\2F5\46693477

The sub-key 2F5 seems to be different on any machine and 46693477 may depends on the installed language (in this case de_de).

How can I determine the full key name in C++ for the current user? I need this to translations for a software - maybe there is a better way of setting the strings than direct registry access?

Edit:
I want to change the values for translating these strings according to a choosen language file (I'm aware that these strings likely should be translated according to the Windows language, not according to the user's setting in a software - but I don't see any other option to translate strings that are seen in Windows explorer).

It's likely that there are more than one subfolder when more than one Windows language package is installed - but how do I get the correct (current) subfolder?
How can I determine which language number (in my case 46693477) stands for which locale?

Thank you for sharing your knowledge.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: dugullett 12 years ago
Red Belt
1

Are you wanting to change the value, or just report it?

This will get the key, and export it to a txt file. I know it's Powershell not C++.

Get-ChildItem -Path "HKCU:\Software\Classes\Local Settings\MuiCache" -recurse|Format-table -hidetableheaders name|Out-File C:\temp\reg.txt

Comments:
  • Thank you for this answer, but I don't want to read every sub key.

    I want to change the values for translating these strings according to a choosen language file (I'm aware that these strings likely should be transalted according to the Windows language, not according to the user's setting in a software - but I don't see any other option to translate strings that are seen in Windows explorer).

    It's likely that there are more than one subfolder when more than one Windows language package is installed - but how do I get the correct (current) subfolder?
    How can I determine which language number (in my case 46693477) stands for which locale? - human 12 years ago
  • Thank you for this answer, but I don't want to read every sub key.

    I want to change it and have to determine the correct sub-key (as there are likely more than one on a multi language installation). - human 12 years ago
Posted by: dj_xest 12 years ago
5th Degree Black Belt
1

These 2 things should help you:

1. HKEY_CURRENT_USER\Control Panel\International\Locale

2. http://msdn.microsoft.com/en-us/goglobal/bb895996.aspx


Comments:
  • Let me thank you for this information first. But I'm afraid it doesn't help as it doesn't apply on the given problem...

    I've thought about the locale, too, but with the same system as mentioned above it's value is 00000407 - how should I translate it to 46693477?

    I guess there must be a different way to write strings to the MUI cache (distributing mui-files is not an option as the software uses gettext). - human 12 years ago
  • That is exactly what I am thinking. 46693477 translate into 00000407 which is a German languange. - dj_xest 12 years ago
Posted by: human 12 years ago
White Belt
0

As the question isn't answered yet, I wanted to renew it. There must be a possible solution.

human

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ