我们构建了一个应用程序,并希望为Shopware 6自定义字段(https://developer.shopware.com/docs/guides/plugins/apps/custom-data/custom-fields)提供一个片段/翻译。
是否可以为每个类别添加翻译文本?
<custom-fields>
<custom-field-set>
<name>minds_show_category_discount</name>
<label>Show Discount</label>
<label lang="de-DE">Rabatt anzeigen</label>
<related-entities>
<category />
</related-entities>
<fields>
<bool name="minds_scd_category_enabled">
<label>Show discount</label>
<label lang="de-DE">Rabatt anzeigen</label>
<position>1</position>
</bool>
<!-- Here I would like to input a text that is translatable -->
</fields>
</custom-field-set>
</custom-fields>发布于 2022-11-28 23:06:50
在自定义字段中没有使用纯文本元素。顾名思义,元素是不同输入的类型、下拉列表、复选框等等。如果要向其中一个UI元素添加描述性文本,可以使用help-text属性,该属性也是可翻译的。
<label>Lorem</label>
<label lang="de-DE">Ipsum</label>
<help-text>Lorem</help-text>
<help-text lang="de-DE">Ipsum</help-text>标签和帮助文本等的所有翻译在所有类别之间都是相同的,如果这是你的意思的话,在一个类别逐个类别级别上不可能有不同。
https://stackoverflow.com/questions/74603534
复制相似问题