swift 本地化找不到键的值
swift localization cannot find value for key
我正在尝试通过 localizeable.strings 导入字符串。不幸的是,它只在我的按钮中显示密钥。请找到附件我的文件树:
这是我的项目信息:
这是我的 localizeable.strings 文件(两者相同以测试其是否正常工作)
"You have sold 1000 apps in %d months" = "You have sold 1000 apps in %d months";
"You like?" = "You asdflike?";
下面是我如何尝试获取您喜欢的值?
likeButton.setTitle(NSLocalizedString("You like?", comment: "You like the result?"),
for: .normal)
}
不幸的是它只显示了密钥而不是结果。我其实不知道我做错了什么
问题似乎是文件名的问题。将文件重命名为 Localizable.strings
.
我正在尝试通过 localizeable.strings 导入字符串。不幸的是,它只在我的按钮中显示密钥。请找到附件我的文件树:
这是我的项目信息:
这是我的 localizeable.strings 文件(两者相同以测试其是否正常工作)
"You have sold 1000 apps in %d months" = "You have sold 1000 apps in %d months";
"You like?" = "You asdflike?";
下面是我如何尝试获取您喜欢的值?
likeButton.setTitle(NSLocalizedString("You like?", comment: "You like the result?"),
for: .normal)
}
不幸的是它只显示了密钥而不是结果。我其实不知道我做错了什么
问题似乎是文件名的问题。将文件重命名为 Localizable.strings
.