<p>Here we go, the final answer:</p>

<pre><code>{% set blockHeadingEnglish = craft.entries.id(entry.id).locale('en').first().myMatrix.id(block.id).first().myFiel %}
</code></pre>

CC BY-SA 3.0
2017-08-02T16:26:16.400Z
2017-08-02T16:26:16.400Z
Jan
<p>You should be able to set the desired locale by adding <code>.locale('en')</code> to your code. </p>

<p>Like so: </p>

<pre><code>{% set fields = craft.sections.getSectionByHandle('news').getEntryTypes()[0].locale('en').getFieldLayout().getFields() %}
</code></pre>

<p>Assuming you've got <code>english</code> defined as <code>en</code>.  </p>

CC BY-SA 3.0
2017-08-02T11:07:36.020Z
2017-08-02T11:07:36.020Z
mrsmn
<p>thanks Michael, that brings me further.
This already works:</p>

<pre><code>{{craft.entries.id(entry.id).locale('en').first().myMatrix[blockCount].myFieldinsideMatrix }}
</code></pre>

<p>But I dont know what to fill in for "blockCount". That leads me to a more general question: 
A field inside an entry of a local is always linked to the same field in another local. But the fields inside Matrixes seem not, because I can create completely different blocks for each local.</p>

<p>That meens what I am trying to do is not possible, right?</p>

CC BY-SA 3.0
2017-08-02T11:20:40.567Z
What do you need? The same layout of blocks between locales but with translated content? Or a different set of blocks for each locale? In the first case, you have to mark the individual blocks as translatable but not the matrix field (I think), for the second case, you're better off not making the individual ones translatable
mrsmn
CC BY-SA 3.0
2017-08-02T12:29:12.220Z
You are right, thats it. Now I am really afraid that all my content (even of the first language) gets lost if I uncheck "translateable" for the matrix...
Jan
CC BY-SA 3.0
2017-08-02T12:32:28.690Z
Take a backup and see what happens? I honestly have no idea ^^
mrsmn
CC BY-SA 3.0
2017-08-02T12:58:30.053Z
ok, this is what I found out: After changing the matrix to not translateable, nothing changes until you edit the content in one of the locals. After doing this, craft copies all the content from that local to all the others. From that point on you can start to translate the fields inside the matrix... this is a relieve :)
Jan
CC BY-SA 3.0
2018-01-05T12:38:00.053Z
@Jan Just to correct here, Craft doesn't copy "all the content from that locale to all the others" - it only does it for locales where the matrix is empty (which is a relief, otherwise pre-existing translations would be wiped out).
James Smith
CC BY-SA 3.0
2017-08-02T11:17:13.173Z
2017-08-02T11:17:13.173Z
Jan
<p>I need to get the content of a field in the Matrix of the English localization in my template. I already have the handle of that field for the current language, but I don't know how to get the English version for that field...</p>

<p>I found this for getting a field of a Matrix:</p>

<pre><code>{% set fields = craft.sections.getSectionByHandle('news').getEntryTypes()[0].getFieldLayout().getFields() %}
</code></pre>

<p>But that works of course again only for the field in the current localization... which I already have.</p>

<matrix><localization><field>
Get field of a Matrix in certain locale
# Get field of a Matrix in certain locale

(Asked by: username_0 on 2017-08-02)

I need to get the content of a field in the Matrix of the English localization in my template. I already have the handle of that field for the current language, but I don't know how to get the English version for that field...
I found this for getting a field of a Matrix:
{% set fields = craft.sections.getSectionByHandle('news').getEntryTypes()[0].getFieldLayout().getFields() %}

But that works of course again only for the field in the current localization... which I already have.

**Tags:** matrix, localization, field

---

## 3 answers

### Answer by username_0 on 2017-08-02. Score: 1 | Accepted answer

Here we go, the final answer:
{% set blockHeadingEnglish = craft.entries.id(entry.id).locale('en').first().myMatrix.id(block.id).first().myFiel %}


---

### Answer by username_1 on 2017-08-02. Score: 2

You should be able to set the desired locale by adding .locale('en') to your code. 
Like so: 
{% set fields = craft.sections.getSectionByHandle('news').getEntryTypes()[0].locale('en').getFieldLayout().getFields() %}

Assuming you've got english defined as en.


---

### Answer by username_0 on 2017-08-02. Score: 1

thanks Michael, that brings me further.
This already works:
{{craft.entries.id(entry.id).locale('en').first().myMatrix[blockCount].myFieldinsideMatrix }}

But I dont know what to fill in for "blockCount". That leads me to a more general question: 
A field inside an entry of a local is always linked to the same field in another local. But the fields inside Matrixes seem not, because I can create completely different blocks for each local.
That meens what I am trying to do is not possible, right?

> **Comments:**
> **username_1**: What do you need? The same layout of blocks between locales but with translated content? Or a different set of blocks for each locale? In the first case, you have to mark the individual blocks as translatable but not the matrix field (I think), for the second case, you're better off not making the individual ones translatable  
> **username_0**: You are right, thats it. Now I am really afraid that all my content (even of the first language) gets lost if I uncheck "translateable" for the matrix...  
> **username_1**: Take a backup and see what happens? I honestly have no idea ^^  
> **username_0**: ok, this is what I found out: After changing the matrix to not translateable, nothing changes until you edit the content in one of the locals. After doing this, craft copies all the content from that local to all the others. From that point on you can start to translate the fields inside the matrix... this is a relieve :)  
> **username_2**: @Jan Just to correct here, Craft doesn't copy "all the content from that locale to all the others" - it only does it for locales where the matrix is empty (which is a relief, otherwise pre-existing translations would be wiped out).  

---

