Version casi lista

This commit is contained in:
alexandrev-tibco
2026-02-17 13:34:02 +01:00
commit e593453abd
99 changed files with 10867 additions and 0 deletions
@@ -0,0 +1,23 @@
import Foundation
func localizedString(_ key: String, language: AppLanguage) -> String {
let resolvedLanguage = language.resolved()
if let path = Bundle.main.path(forResource: resolvedLanguage.localeIdentifier, ofType: "lproj"),
let bundle = Bundle(path: path) {
let localized = bundle.localizedString(forKey: key, value: nil, table: nil)
if localized != key {
return localized
}
}
if let path = Bundle.main.path(forResource: "en", ofType: "lproj"),
let bundle = Bundle(path: path) {
let english = bundle.localizedString(forKey: key, value: nil, table: nil)
if english != key {
return english
}
}
return NSLocalizedString(key, comment: "")
}