/ gist

16. Swift gist: String+Localized.swift

This is a super handy snippet to localize strings. You can also extend NSString, but we are in a "Swift-y" world, so always use String type if it's possible.

public extension String
{
    public var localized: String {
        return NSLocalizedString(self.lowercased(), tableName: nil, bundle: .main, value: "", comment: "")
    }
}