問題描述
Windows 7(可能還有 Windows Vista)使用 desktop.ini
文件中的 LocalizedResourceName
條目顯示本地化文件夾名稱.對于我的 Documents
文件夾,這看起來像
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%system32shell32.dll,-21770
IconResource=%SystemRoot%system32imageres.dll,-112
IconFile=%SystemRoot%system32shell32.dll
IconIndex=-235
(請參閱這個問題)
這樣,資源管理器在德語 Windows 上將路徑C:UsersUsernameDocuments"顯示為C:BenutzerUsernameDokumente".
This way the explorer displays the path "C:UsersUsernameDocuments" as "C:BenutzerUsernameDokumente" on a german Windows.
我想知道,是否有任何內置的 shell 函數可以自動獲取此本地化名稱,或者甚至更好地將整個路徑轉換為其本地化形式(最好是 .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().Michael Kaplan 的博客上有一個 PInvoke 示例.
SHGetLocalizedName(). There is a PInvoke sample on Michael Kaplan's blog.
這篇關于獲取本地化路徑的功能?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!