Localization of Special Folder Constants

Viewed 104

Does anyone happen to know if there is a complete list of Windows 10 localized folders (like this one just for all folders)? I am trying to create a custom explorer where the folder should be displayed in the user's native language.

I have already tried to get a complete list of localized folders using the ShellSpecialFolderConstants enumeration or the Environment.SpecialFolder enumeration. but there are still a few missing (C:/Users for example).

SHGetFileInfo is unfortunately also out of the question, because otherwise the performance would suffer massively.

I have thought of simply designing a long selection statement for it in which all localized folders are stored. And if there was already a table of equivalents, it would of course be very handy to know.

Thanks in advance!

1 Answers

Microsoft does not provide a list because you are not supposed to know, you are supposed to use the special/known folder API. This is to prevent people from hard-coding c:\Program files etc. In older versions of Windows the folders on disk were often localized. In Vista this changed and the real names are English now.

If you are building a custom Explorer then you should be dealing with IShellFolder/IShellItem and they can provide the display name.

If you are working at a lower level and ignoring the shell namespace you can call SHGetLocalizedName. This name can be applied to any folder, not just special folders.

If you for some reason only care about the special folders and not paths in general, IKnownFolder::GetFolderDefinition claims to return a structure that includes the localized name.

Related