答案 0 :(得分:1)
您可以自己创建正确的捆绑目录和字符串文件,并使用更长版本的NSLocalizedString。
Alejandro Martinez的approach is described here:
// The two important new parameters are `tableName` and `bundle`.
// By default when using NSLocalizedString the system uses the App
// main bundle and the Localizable table, *table* meaning the name
// of the strings file. So to hook into the localization system we
// just need to convert the object structure that we have in memory
// to the proper file hierarchy that is expected on disk.
NSLocalizedString(_ key: String, tableName: String? = default,
bundle: Bundle = default, value: String = default, comment: String)
-> String