0

我有可本地化的英语和法语。我想将注册符号显示为单词的一部分,即“MyApp®”。本地化文件的英文部分在 iOS APP UI 中显示此符号正确。法语版本也需要显示,即“MyAppᴹᴰ”,但在“M”和“D”之间有空格。

我也尝试使用 unicode 之类的MyApp\u{1D39}\u{1D30}. 这可以在 Swift 操场上工作,但如果我通过本地化文件尝试它就行不通。

iOS 版本:11.4 我只需要在本地化文件中进行更改,而不是在代码中的每个位置都使用 NSAttributed 字符串。如果有人遇到同样的问题,并找到解决方案,请发布。

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file

print(String(describing: "MyApp\u{1D39}\u{1D30}" // swift playground
print(String(describing: "ᴹᴰ")) // swift playground

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file
"MyApp®" = "MyAppᴹᴰ" // Localization file- on UI space comes b/w ᴹ and ᴰ

print(String(describing: "MyApp\u{1D39}\u{1D30}")) // swift playground
print(String(describing: "ᴹᴰ")) // swift playground

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file

在 iOS 应用程序 UI 组件上,应将 MyApp® 呈现为 MyAppᴹᴰ 并且 ᴹ 和 ᴰ 之间没有空格。

4

1 回答 1

0
于 2019-01-24T04:29:13.380 回答