我想输出这个字符串的翻译By clicking on "Post"
使用 gettext,如何转义引号?我应该试试\ "
?
msgid "By clicking on"
msgstr ""
最佳答案
是的,您需要使用反斜杠 (\") 转义双引号。
gettext manual说如下:
The two strings, untranslated and translated, are quoted in various ways in the PO file, using " delimiters and \ escapes
...
Each of untranslated-string and translated-string respects the C syntax for a character string, including the surrounding quotes and embedded backslashed escape sequences.
关于escaping - 用 gettext 打印 ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10218631/