Any updates to how to localize attributed strings

Asked on 06/11/2025

1 search

To localize attributed strings, Apple has introduced new features in SwiftUI and Xcode that enhance the localization process. In SwiftUI, the TextView now supports AttributedString, allowing for rich text editing and localization. You can pass a binding to an AttributedString into a TextEditor, which supports built-in text formatting controls. This is particularly useful for creating rich text experiences and customizing paragraph styles, transforming attributes, and constraining attributes in your app. For more details, you can check out the session Cook up a Rich text experience in SwiftUI with AttributedString.

Additionally, Xcode has improved its localization tools with string catalogs, which now support extracting strings from code and generating symbols for manually added strings. This makes it easier to manage translations and keep strings in sync with your code. The session Explore localization with Xcode provides a detailed walkthrough of these new features.