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

Comments

Please log in to comment

Answers

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
Answered 06/08/2012 by: dugullett
Red Belt

  • 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?
  • 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).
Please log in to comment
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

Answered 06/11/2012 by: dj_xest
Fifth Degree Black Belt

  • 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).
  • That is exactly what I am thinking. 46693477 translate into 00000407 which is a German languange.
Please log in to comment
0

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

human

Answered 07/23/2012 by: human
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share