4 ms·
It's going to depend on the platform, but this is a good tutorial for iOS localization [0]. Effectively, it's going to look like: let alertTitle = NSLocaliz
by dlivingston 7y ago
It's going to depend on the platform, but this is a good tutorial for iOS localization [0].
Effectively, it's going to look like:
let alertTitle = NSLocalizedString("Welcome", comment: "")
let alert = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: UIAlertControllerStyle.Alert)
and the localized .strings file will look like this [1],[2]:
"Welcome" = "Bienvenido"
[0]: https://medium.com/lean-localization/ios-localization-tutorial-938231f9f881 https://medium.com/lean-localization/ios-localization-tutori...
[1]: https://cdn-images-1.medium.com/max/1600/1*EjF2SGh4kRQSnbmke4BlRQ.png https://cdn-images-1.medium.com/max/1600/1*EjF2SGh4kRQSnbmke...
[2]: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html https://developer.apple.com/library/archive/documentation/Co...