Ask Your Question
2

Is it possible to localize an AttributedString from a Storyboard even though XCode only supports localization for plain text strings?

asked 2023-05-27 08:24:20 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-05-27 08:46:01 +0000

lakamha gravatar image

No, it is not possible to localize an AttributedString directly from a Storyboard in Xcode. Xcode only supports localization for plain text strings. However, you can create separate AttributedStrings for each language and load the appropriate one programmatically based on the user's language preference. You can also use localized string keys for the text content of your AttributedString and provide translations for those keys in separate language-specific files.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-27 08:24:20 +0000

Seen: 2 times

Last updated: May 27 '23