如果您将以下简单的代码片段放入Playground中:importFoundationlethumanReadableNames=["test":NSLocalizedString("foo")]你会得到编译器错误:Cannotconfertheexpression'stype'Dictionary'totype'DictionaryLiteralConvertible'Swift函数NSLocalizedString被定义为返回String,所以我不明白为什么这个变量的类型不只是Dictionary. 最佳答案 看来你需要在NSL