skip to Main Content

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?

2

Answers


  1. 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.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search