1

I'm implementing app localization through phone system preferences, i follow this thread, but faced an issue, when i back to my app from system preferences, app is not responding to any actions ? what i'm doing wrong or what i should implement to fix this bug.

my code:

Button(action: {
    if let url = NSURL(string: UIApplication.openSettingsURLString) as URL? {
        UIApplication.shared.open(url, options: [:], completionHandler: nil)
    }
        }) {
    SelectLanguageButton(title: "login_view_language_btn_lbl".localized)
}
           

localization ext:

extension String {
    var localized: String {
        return AppLocalization.language(key: self)
    }
    
    func localizedWithParams(_ arguments: CVarArg...) -> String {
        return AppLocalization.language(key: self, arguments)
    }
}

Also i tried this way: NSLocalizedString("login_view_email_textfield_lbl", comment: "")

But way of localization is not the point for me.

Arasuvel
  • 2,971
  • 1
  • 25
  • 40

0 Answers0