Mohsin
Mohsin

Reputation: 203

Shopware 5 - Column name not changing via snippet

I have created a Free text field in s_articles_attributes table and also marked it as translatable, when i am viewing items > overview and enabling that column, the column name isn't changed to what i put in snippet.

Does anybody know how can i make it translate according to my snippet. I thought it should be straightforward. or is there something extra i should be doing?

enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 238

Answers (1)

Michael T
Michael T

Reputation: 927

The snippets for attributes need to follow a special scheme.

  • First of all the snippet itself needs to be in the namespace backend/attribute_columns
  • Then the naming of the snippet key is important:
    • for labels: <attbribute_table>_<attribute_name>_label
    • for support texts: <attbribute_table>_<attribute_name>_supportText
    • for help texts: <attbribute_table>_<attribute_name>_helpText

So for your case the snippet key has to look like this: s_articles_attributes_warehouse_us_label. Also don't forget to create it in the right namespace.

You can find more about this in our documentation: https://developers.shopware.com/developers-guide/attribute-system/#attribute-label-translations

Upvotes: 1

Related Questions