Created
August 9, 2017 19:11
-
-
Save vincent-pradeilles/14b6a2b56b8058ba89515664b1e73731 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public func OverridableLocalizedString(key: String, value: String = "", comment: String = "") -> String { | |
return NSLocalizedString(key, tableName: "Override", bundle: Bundle.main, value: FrameworkLocalizedString(key, value: value), comment: comment) | |
} | |
private func FrameworkLocalizedString(_ key: String, value: String) -> String { | |
guard let bundle = Bundle.whiteLabelBundle() else { return "" } | |
return NSLocalizedString(key, tableName: nil, bundle: bundle, value: value, comment: "") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment