Adding rich text in localizable.strings
Is it possible to add some s开发者_C百科ort of styling to my localizable.strings file.
For example
"HELLO_WORLD" = "Hello \bold WORLD \bold";
No, it is not possible. Localized strings can be used in many places in your code and UI, only some of which may support display of rich text. For example, a UILabel has a text property that you can set from a localized string but it has no capability of showing rich text.
You will need to choose some way of displaying rich text in your UI then decide how you are going to encode that text in a localized string. You may end up having to parse the localized string and do custom text drawing depending on where and how you want to display the text.
精彩评论