How does the value of a Matrix field translate for different sites in Craft5? #15959
-
I'm importing data from a complex excel file. I need to create or update Entries on the various sites that exist on my Craft installation. I have some Martix fields that are translatable by site but, unlike the other fields, I cannot translate their contents. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Matrix fields themselves are not translatable; instead they have Propagation Methods, which determine how their nested entries should get propagated across the sites that the owner element belongs to. For example, if you have two sites, Site A and Site B, and a Section whose Propagation Method is set to “Save entries to all sites enabled for this section”, any entries within the section will exist across both sites. If you have a Matrix field within that section whose Propagation Method is set to “Save entries to all sites the owner element is saved in”, then its nested entries will also be saved to both sites. Then you have fields that live within your nested Matrix entries, who may have Translation Method settings. Translation Methods determine whether field values should be managed independently for each site, or kept consistent between the sites. If you have a Plain Text field set to “Not translatable”, any content saved to that field will be copied across all the sites that the element belongs to. If it’s set to “Translate for each site”, on the other hand, then each site will get its own unique value for that field. So to answer your question, the setup you probably want (if I understand what you’re trying to get at) is:
|
Beta Was this translation helpful? Give feedback.
Matrix fields themselves are not translatable; instead they have Propagation Methods, which determine how their nested entries should get propagated across the sites that the owner element belongs to.
For example, if you have two sites, Site A and Site B, and a Section whose Propagation Method is set to “Save entries to all sites enabled for this section”, any entries within the section will exist across both sites. If you have a Matrix field within that section whose Propagation Method is set to “Save entries to all sites the owner element is saved in”, then its nested entries will also be saved to both sites.
Then you have fields…