我想翻译所有Django模板,这意味着我需要遍历模板中的每个单词或句子,并将code _()添加到模板中。对于ex:<h1>hello</h1>将是:<h1>_("hello")</h1>
<h1>hello</h1>
<h1>_("hello")</h1>
但是我想自动完成它,因为我有很多句子,不管是软件,还是在线工具,还是文本编辑器,都可以实现过程的自动化。
发布于 2022-10-20 09:45:07
也许您需要使用块翻译标记,请参阅文档:https://docs.djangoproject.com/en/4.1/topics/i18n/translation/#blocktranslate-template-tag
https://stackoverflow.com/questions/74137579
相似问题