问题描述
Windows 7的(也可能是Windows Vista的),使用在 LocalizedResourceName
输入显示本地化文件夹名称的desktop.ini
文件。对于我的文件
文件夹中,这看起来像
Windows 7 (and probably Windows Vista) display localized folder names using the LocalizedResourceName
entry in the desktop.ini
file. For my Documents
folder, this looks like
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235
(见this问题)
这样的资源管理器显示路径C:\ Users \用户名\文件的形式是:在德语WindowsC:\ Benutzer \用户名\ Dokumente
This way the explorer displays the path "C:\Users\Username\Documents" as "C:\Benutzer\Username\Dokumente" on a german Windows.
我在想,如果有任何内置的外壳功能可自动获得这个本地化的名称,或者甚至更好,改造整个路径到其本地化的形式(最好是在.NET什么)?
I wonder, if there's any build-in shell function to automatically get this localized name or, even better, transform a whole path into its localized form (best would be anything in .NET)?
这是更有趣的 LocalizedResourceName
内容只记载为Windows CE(见的)。
This is even more interesting as the LocalizedResourceName
entry is only documented for Windows CE (see here).
感谢
马丁
推荐答案
SHGetLocalizedName ()。有在迈克尔·卡普兰的博客一个PInvoke的样本。
SHGetLocalizedName(). There is a PInvoke sample on Michael Kaplan's blog.
这篇关于功能获取本地化的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!