<p>So it seems like the short answer is: you can't.</p>
<p>First you have to create the entry and superTable to the default site and it copies the data to every site.</p>
<p>Then you need to update the entry WITH siteId of other site and update the supertable.</p>
<p>That's the way that worked for me!</p>

CC BY-SA 4.0
2021-08-17T13:36:12.993Z
2021-08-17T13:36:12.993Z
Martin288
<p>Usually, site association for elements is controlled using the <code>$siteId</code> property. Try this:</p>
<pre class="lang-php prettyprint-override"><code>$superTableData['new1'] = [
    'type' =&gt; $blockType-&gt;id,
    'enabled' =&gt; true,
    'siteId' =&gt; 123, // replace with your site ID
    'fields' =&gt; [
       'field1' =&gt; 'value',
       'field2' =&gt; 'value',
    ]
];
</code></pre>

CC BY-SA 4.0
2021-07-28T13:32:40.877Z
yeah I tried, it doesn't work unfortunately.
Martin288
CC BY-SA 4.0
2021-07-28T08:04:31.917Z
2021-07-28T08:04:31.917Z
MoritzLost
<p>I want to save a supertable with different infos on two different siteId of an entry. It works fine with all the other fields i'm using: the value is saved separately to each different language. But with the supertable, the info is saved, but it overrides both languages with the new info.. Is there a parameter we need to add or something?
I'm using this:</p>
<pre><code>$field = Craft::$app-&gt;getFields()-&gt;getFieldByHandle($handle);
    $blockTypes = SuperTable::$plugin-&gt;getService()-&gt;getBlockTypesByFieldId($field-&gt;id);
    $blockType = $blockTypes[0];

    $superTableData['new1'] = [
        'type' =&gt; $blockType-&gt;id,
        'enabled' =&gt; true,
        'fields' =&gt; [
           'field1' =&gt; 'value',
           'field2' =&gt; 'value',
         ]
    ];
</code></pre>
<p>thanks!</p>

<craft3><multi-site><plugin-supertable>
Supertable bilingual (multi-site)
# Supertable bilingual (multi-site)

(Asked by: username_0 on 2021-07-27)

I want to save a supertable with different infos on two different siteId of an entry. It works fine with all the other fields i'm using: the value is saved separately to each different language. But with the supertable, the info is saved, but it overrides both languages with the new info.. Is there a parameter we need to add or something?
I'm using this:
$field = Craft::$app->getFields()->getFieldByHandle($handle);
    $blockTypes = SuperTable::$plugin->getService()->getBlockTypesByFieldId($field->id);
    $blockType = $blockTypes[0];

    $superTableData['new1'] = [
        'type' => $blockType->id,
        'enabled' => true,
        'fields' => [
           'field1' => 'value',
           'field2' => 'value',
         ]
    ];

thanks!

**Tags:** craft3, multi-site, plugin-supertable


---

## 2 answers

### Answer by username_0 on 2021-08-17. Score: 1

So it seems like the short answer is: you can't.

First you have to create the entry and superTable to the default site and it copies the data to every site.

Then you need to update the entry WITH siteId of other site and update the supertable.

That's the way that worked for me!


---

### Answer by username_1 on 2021-07-28. Score: 1

Usually, site association for elements is controlled using the $siteId property. Try this:
$superTableData['new1'] = [
    'type' => $blockType->id,
    'enabled' => true,
    'siteId' => 123, // replace with your site ID
    'fields' => [
       'field1' => 'value',
       'field2' => 'value',
    ]
];

> **Comments:**
> **username_0**: yeah I tried, it doesn't work unfortunately.  

---

