//
//  Copyright © 2016 Cleverlance. All rights reserved.
//

import Foundation

public final class FoundationLocalizer: Localizer {

    public init() { }

    public func localize(_ key: String) -> String {
        return NSLocalizedString(key, comment: "")
    }
}

public var implicitLocalizer: Localizer = FoundationLocalizer()
public func localize(_ key: String) -> String {
    return implicitLocalizer.localize(key)
}

//
//  Copyright © 2016 Cleverlance. All rights reserved.
//

import Foundation

public final class FoundationLocalizer: Localizer {

    public init() { }

    public func localize(_ key: String) -> String {
        return NSLocalizedString(key, comment: "")
    }
}

private let foundationLocalizer = FoundationLocalizer()
public func localize(_ key: String) -> String {
    return foundationLocalizer.localize(key)
}

--- 
+++ 
@@ -13,7 +13,7 @@
     }
 }
 
-private let foundationLocalizer = FoundationLocalizer()
+public var implicitLocalizer: Localizer = FoundationLocalizer()
 public func localize(_ key: String) -> String {
-    return foundationLocalizer.localize(key)
+    return implicitLocalizer.localize(key)
 }
Enable customization of implicit localizer
