简体   繁体   English

如何在Cocoa中获取系统文件夹的本地化名称

[英]How to get localized name of System Folder in Cocoa

I want to get localized name of System Folders according to user's language settings. 我想根据用户的语言设置获取系统文件夹的本地化名称。 For example, "Documents" directory is displayed "Documentos" in Spanish, "書類" in Japanese. 例如,“Documents”目录以西班牙语显示“Documentos”,用日语显示“书类”。

Is there any way to get these localized folder name programmatically? 有没有办法以编程方式获取这些本地化的文件夹名称? I'm using Cocoa framework on OSX 10.6 and 10.7. 我在OSX 10.6和10.7上使用Cocoa框架。

在NSFileManager上查看此方法

- (NSString *)displayNameAtPath:(NSString *)path

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM