Skip to content

Commit 56bc8e9

Browse files
committed
NSLocalizedString
1 parent bf3c799 commit 56bc8e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Foundation/NSString.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ extension unichar : ExpressibleByUnicodeScalarLiteral {
2121
}
2222

2323
// Placeholder for a future implementation
24-
public func NSLocalizedString(_ key: String, comment: String?) -> String {
25-
return key
24+
public
25+
func NSLocalizedString(_ key: String,
26+
tableName: String? = nil,
27+
bundle: Bundle = Bundle.main,
28+
value: String = "",
29+
comment: String?) -> String {
30+
return bundle.localizedString(forKey: key, value:value, table:tableName)
2631
}
2732

2833
#if os(OSX) || os(iOS)

0 commit comments

Comments
 (0)