iOS 中的本地化
为每种语言创建单独的 Localizable.strings
文件。每种语言的右侧都不同。将其视为键值对:
"str" = "str-language";
在 Objective-C 中访问 str:
//Try to provide description on the localized string to be able to create a proper documentation if needed
NSString *str = NSLocalizedString(@"string", @"description of the string");
在 Swift 中访问 str:
let str = NSLocalizedString("string", comment: "language");