I know how to localize strings through the strings file but most of my app content is through code in the view controllers and files, how can I localize a button like this?
button.setTitle("String", for: .normal)
I know how to localize strings through the strings file but most of my app content is through code in the view controllers and files, how can I localize a button like this?
button.setTitle("String", for: .normal)
If there is a Key "String" in your localizable.strings file defining the translations for that word, all you need to do is replace the "String" in your file by NSLocalizedString("String", comment: "") And your String Will be localized