iOS - info.plist 國際化斷行問題(目前無解)
先寫結論
info.plist 國際化斷行問題,目前無解。
說明
網路上只找得到 info.plist 國際化的作法為:添加 InfoPlist.strings 。
但目前發現使用 InfoPlist.strings,其英文斷行皆是以字母斷行,而且無法控制斷行位置(無解決方法)。
實際遇到的狀況
我在 StackOverflow 發了兩條問題,皆是以 InfoPlist.strings 國際化後遇到的問題,目前都無法找到完美解法:
-
在 viewWillAppear 中將 StoryBoard 的 UILabel 字串換成國際化字串後斷行錯誤
Word Wrap wrong when changing strings in viewWillAppear -
系統權限說明文字國際化斷行錯誤
System Alert wrong word wrap when using localization strings
對於第 1 條問題,原本的作法是在 viewWillAppear 中將 StoryBoard 的 UILabel、UIButton 等等填入 InfoPlist.strings 的變數字串即可,但它斷行會有問題。最後