Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

[RESOLVED] How can I get column property names in different languages?

$
0
0
Suppose the PC has English and Spanish languages installed.

How do I get the text strings for a property column heading in both English and Spanish?

For example, how could I get the heading for either the canonical name "System.ItemNameDisplay" or the PROPERTYKEY PKEY_FileName in both English and Spanish.

Currently, I use PSGetPropertyDescriptionByName() and IPropertyDescription::GetDisplayName() to get the column name from the canonical name. It returns the name in the current language. I can't see how to select the language using a LANGID.

IColumnManager::GetColumnInfo()could give me the column name, but appears to depend on an IShellView object which the program doesn't have. Even if I could use it, I can't see how it would support a LANGID.

I saw a ten year old StackOverflow post, "Temporarily change locale settings," implying that temporary changes to the current locale is not the way to go. I suspect this is still true.

I have investigated IPropertStore, IPropertyStorage, and spent hours searching.

Ideally, I'd implement a function that takes a LANGID, and a property, and returns the text value of the property in the given language.

Viewing all articles
Browse latest Browse all 3042

Trending Articles