<p>Assuming you're on the latest 3.5.x release, then my guess is you need to set the &quot;Title Translation Method&quot; setting for whatever Entry Type you're saving to to &quot;Translate for each site&quot;.</p>
<p><a href="https://i.sstatic.net/cx7KT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cx7KT.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2020-09-15T08:37:34.617Z
I wasn't aware of this new feature! Thank you, this fixed the issue for me.
Simon Davies
CC BY-SA 4.0
2020-09-14T21:25:09.680Z
2020-09-14T21:25:09.680Z
Brad Bell
<p>I'm working on a Craft project that has 3 sites. The content for one section is pulled from an API using a console script which runs every 5 minutes.</p>
<p>This has been working fine but I've discovered a bug that the title's aren't being updated across all sites as they are translatable.</p>
<p>This is my current code.</p>
<pre><code>$entry-&gt;title = $data-&gt;name;
$entry-&gt;setFieldValues([
    'body' =&gt; $data-&gt;text,
    'relatedArticles' =&gt; array_map(function($id){
        return [
            'relatedId' =&gt; $id,
        ];
    }, $data-&gt;related),
    'categories' =&gt; array_map(function($cat) {
        return (isset($this-&gt;categories[$cat])) ? (int) $this-&gt;categories[$cat] : false;
    }, $data-&gt;categories),
]);
$success = Craft::$app-&gt;elements-&gt;saveElement($entry);
</code></pre>
<p>All other fields are not translatable so they work fine, Is there a way to propagate the title across all sites or do I need to loop through all the sites to update the entry?</p>

<craft3><entries><localization><modules>
Update entry title for all sites
# Update entry title for all sites

(Asked by: username_0 on 2020-09-04)

I'm working on a Craft project that has 3 sites. The content for one section is pulled from an API using a console script which runs every 5 minutes.
This has been working fine but I've discovered a bug that the title's aren't being updated across all sites as they are translatable.
This is my current code.
$entry->title = $data->name;
$entry->setFieldValues([
    'body' => $data->text,
    'relatedArticles' => array_map(function($id){
        return [
            'relatedId' => $id,
        ];
    }, $data->related),
    'categories' => array_map(function($cat) {
        return (isset($this->categories[$cat])) ? (int) $this->categories[$cat] : false;
    }, $data->categories),
]);
$success = Craft::$app->elements->saveElement($entry);

All other fields are not translatable so they work fine, Is there a way to propagate the title across all sites or do I need to loop through all the sites to update the entry?

**Tags:** craft3, entries, localization, modules

---

## 1 answers

### Answer by username_1 on 2020-09-14. Score: 1 | Accepted answer

Assuming you're on the latest 3.5.x release, then my guess is you need to set the "Title Translation Method" setting for whatever Entry Type you're saving to to "Translate for each site".

[![enter image description here](https://i.sstatic.net/cx7KT.png)](https://i.sstatic.net/cx7KT.png)

> **Comments:**
> **username_0**: I wasn't aware of this new feature! Thank you, this fixed the issue for me.  

---

