获取本地化路径的功能? [英] Function for getting localized path?

查看:21
本文介绍了获取本地化路径的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

这篇关于获取本地化路径的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆