Does Xcode or Swift have a list of predefined localized words (e.g. "Delete", "Edit" etc.) that I can use in my app and to be sure that it localized properly?
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
2
Answers
If you have a Navigationview and you use a Navigationlink, you will see, that the back button will be localized automatically (at lest for german in my app). So all buttons that get generated for you, could be localized for some languages.
But as far as I know, there is no set of predefined localizations you could access to use. Though it is very easy in SwiftUI to make localizations, just have a look at:
https://phrase.com/blog/posts/swiftui-tutorial-localization/
If you have a string file with your localizations you can use the definitions of those strings directly in the text parameters of the SwiftUI Views and they will automatically be changed with the localized version, no need to even cast the identifier of the string in the strings file to a
LocalizedStringKey
.Seriously, if you were to rely on some automatic translation for your UI, then I can promise you that people will complain, because most will find an automatic translation into their own language harder to read than good English.