xcode iPhone - 带有双引号转义字符的 Localizable.strings

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10365913/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:07:44  来源:igfitidea点击:

iPhone - Localizable.strings with double quotes escape character

iphoneobjective-ciosxcode

提问by Abdalrahman Shatou

Inside the Localizable.strings file, if I add the escape character ", the file fails the building process.

在 Localizable.strings 文件中,如果我添加转义字符“,文件将无法构建过程。

For example:

例如:

"Now open ""Phone"" application" = "Maintenant ouvert ""Téléphone"" application";

I get an error due to this line. If commented out, it works just fine.

由于此行,我收到错误消息。如果注释掉,它工作得很好。

回答by Costique

You have to escape the quote marks with a backslash:

你必须用反斜杠转义引号:

"Now open \"Phone\" application" = "Maintenant ouvert \"Téléphone\" application";