Xcode 13 and Swift Localization

submited by
Style Pass
2021-06-29 16:30:07

WWDC 2021 brought Xcode 13 and Swift 5.5, the biggest advances to localization we’ve seen for a few years. These are real improvements that will make localization easier for developers. And anything that makes it easier for developers benefits translators and international users. 🥳 🎉 🎊

All of these changes in localization require you to adopt the latest version of Xcode 13 and Swift. That may be a dealbreaker for some, but if you’ve got Swift code, I highly recommend it. The improvements include: localized Attributed Strings, improved Formatters, and something amazing (?) called Automatic Grammar Agreement.

Formatting text and adding links has always been a pain point in iOS and Mac localization. Many developers give us broken sentences to localize because they want to apply specific formatting (bold, italics, etc.), or include a link. Localizing plain HTML with formatting and links, by contrast, is straightforward:

In the past, formatted or Attributed Strings, in iOS/Mac development were complicated. Worse yet, Attributed strings were not localizable. (In fact, some developers would mark strings in Xcode as Attributed just so they would not export for translation!) In the Localizable.strings file, we would get things like:

Leave a Comment