     
     private func applyOverrides(for bundle: Bundle) {
         let bundleURI = self.bundleURI(for: bundle)
-        var storedOverrides: [String: String] = userDefaults.dictionary(forKey: storedOverridesKey) as? [String: String] ?? [:]
+        var storedOverrides: [String: Any] = userDefaults.dictionary(forKey: storedOverridesKey) ?? [:]
         var discardedOverrideKeys: [String] = []
         
-        forEachOverride: for override in storedOverrides {
+        forEachOverride: for storedOverride in storedOverrides {
             guard
-                let keyPath = LocKeyPath(string: override.key),
+                let keyPath = LocKeyPath(string: storedOverride.key),
                 keyPath.bundleURI == bundleURI
             else {
                 continue
             }
             
-            guard
-                var entry = self.entry(for: keyPath),
-                case .static(let translatedText) = entry.translation,
-                let originalTypes = translatedText.formatPlaceholderTypes,
-                let overrideTypes = override.value.formatPlaceholderTypes
+            guard var entry = self.entry(for: keyPath) else {
+                // ignore override if the key is not found
+                discardedOverrideKeys.append(storedOverride.key)
+                continue
+            }
+            
+            let override: Translation
+            if let overrideText = storedOverride.value as? String {
+                override = .static(overrideText)
+            }
+            else if let config = storedOverride.value as? [String: Any],
+                let overrideFormat = try? LocalizedFormat(config: config) {
+                override = .dynamic(overrideFormat)
+            }
             else {
-                // ignore override if either that or the original string is not a valid format string
-                discardedOverrideKeys.append(override.key)
+                // ignore override if it has an invalid format
+                discardedOverrideKeys.append(storedOverride.key)
                 continue
             }
-
-            // check whether the argument types match up
-            for (position, type) in overrideTypes {
-                guard
-                    let originalType = originalTypes[position],
-                    type == originalType
-                else {
-                    discardedOverrideKeys.append(override.key)
-                    continue forEachOverride
-                }
-            }
-
+            
+            guard ((try? validateOverride(override, for: entry.translation)) != nil) else {
+                discardedOverrideKeys.append(storedOverride.key)
+                continue forEachOverride
+            }
+            
             overriddenKeyPaths.insert(keyPath)
-            entry.override = .static(override.value)
+            entry.override = override
             setEntry(entry, for: keyPath)
         }
         

    case invalidFormat
}

typealias StringsDB = [BundleURI: [ResourceURI: [LocKey: StringsEntry]]]

@objc final class StringsManager: NSObject {

        db[keyPath.bundleURI]?[keyPath.resourceURI]?[keyPath.locKey] = entry
    }
    
    func addOverride(_ override: Translation, for keyPath: LocKeyPath) throws {
        guard var entry = self.entry(for: keyPath) else {
            throw OverrideError.invalidKeyPath
        }
        
        try validateOverride(override, for: entry.translation)
        
        entry.override = override
        setEntry(entry, for: keyPath)
        
        overriddenKeyPaths.insert(keyPath)
        
        var storedOverrides = userDefaults.dictionary(forKey: storedOverridesKey) ?? [:]
        switch override {
        case .static(let string): storedOverrides[keyPath.description] = string
        case .dynamic(let format): storedOverrides[keyPath.description] = format.toStringsDictEntry()
        }
        
        userDefaults.setValue(storedOverrides, forKey: storedOverridesKey)
    }
    
