CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2024
    Posts
    2

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

    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.

  2. #2
    Join Date
    Dec 2024
    Posts
    2

    Re: How can I get column property names in different languages?

    Problem solved elsewhere.
    Use SetThreadUILanguage().

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured