Function for getting localized path?(获取本地化路径的功能?)
问题描述
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.
这篇关于获取本地化路径的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:获取本地化路径的功能?


基础教程推荐
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01