gpt4 book ai didi

escaping - 用 gettext 打印 "

转载 作者:行者123 更新时间:2023-12-04 22:49:38 24 4
gpt4 key购买 nike

我想输出这个字符串的翻译
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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com