File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,22 @@ extension unichar {
19
19
}
20
20
21
21
/// Returns a localized string, using the main bundle if one is not specified.
22
- public
23
- func NSLocalizedString( _ key: String ,
24
- tableName: String ? = nil ,
25
- bundle: Bundle = Bundle . main,
26
- value: String = " " ,
27
- comment: String ) -> String {
28
- #if os(Android)
29
- return key
30
- #else
31
- return bundle. localizedString ( forKey: key, value: value, table: tableName)
32
- #endif
22
+ #if os(Android)
23
+ public func NSLocalizedString( _ key: String ,
24
+ tableName: String ? = nil ,
25
+ value: String = " " ,
26
+ comment: String ) -> String {
27
+ return key
33
28
}
29
+ #else
30
+ public func NSLocalizedString( _ key: String ,
31
+ tableName: String ? = nil ,
32
+ bundle: Bundle = Bundle . main,
33
+ value: String = " " ,
34
+ comment: String ) -> String {
35
+ return bundle. localizedString ( forKey: key, value: value, table: tableName)
36
+ }
37
+ #endif
34
38
35
39
#if os(macOS) || os(iOS)
36
40
internal let kCFStringEncodingMacRoman = CFStringBuiltInEncodings . macRoman. rawValue
You can’t perform that action at this time.
0 commit comments