1
縱觀the documentation我找不到任何提及它的地方,所以我會問:枝條i18n擴展是否支持可以通過gettext提取的嵌入式註釋?換句話說,是有這樣的一個等價的樹枝語法:向Twig模板添加gettext註釋?
/// TRANSLATORS: Please leave %s as it is, because it is needed by the program.
/// Thank you for contributing to this project.
printf(_("My name is %s."), $myName);
將被提取爲:
#. TRANSLATORS: Please leave %s as it is, because it is needed by the program.
#. Thank you for contributing to this project.
msgid "My name is %s."
msgstr ""