<p>You could try adding something like the following to the end of your template. This is assuming you only have 2 locales.</p>

<pre><code>{# test for the current entry locale (i.e. spanish) #}
{% if entry.locale = 'es' %}

    {# retrieve the same entry in the original locale #}
    {% set localizedEntry = craft.entries.id(entry.id).locale('en') %}

    {# compare the body content, and append additional content #}
    {% if localizedEntry[0].body == entry.body %}
        Sorry, not translated yet.
    {% endif %}

{% endif %}
</code></pre>

CC BY-SA 3.0
2014-10-08T09:16:23.847Z
Cool. Could you explain what is exactly happening here? What does `[0]` do?
KSPR
CC BY-SA 3.0
2014-10-08T09:22:28.067Z
`craft.entries` returns an ElementCriteriaModel that essentially acts like an array of entries, even if it only has 1 entry. `[0]` or `.first` returns the first item in the array.
Douglas McDonald
CC BY-SA 3.0
2014-10-08T09:24:51.547Z
In this case, you could also use: `{% set localizedEntry = craft.entries.id(entry.id).locale('en').first %}` and then wouldn't need the `[0]` in the `if` statement.
Douglas McDonald
CC BY-SA 3.0
2014-10-08T09:10:33.823Z
2014-10-08T09:31:55.037Z
2014-10-08T09:31:55.037Z
Douglas McDonald
<p>For entries where the content isn't translated yet I'd like to add a "Sorry not translated yet" message.</p>

<p>Since all the content is synced is there a way to check if the synced content is the same as in the other locales?</p>

<localization><conditional>
Detect if a language is translated or not
# Detect if a language is translated or not

(Asked by: username_0 on 2014-10-08)

For entries where the content isn't translated yet I'd like to add a "Sorry not translated yet" message.

Since all the content is synced is there a way to check if the synced content is the same as in the other locales?

**Tags:** localization, conditional


---

## 1 answers

### Answer by username_1 on 2014-10-08. Score: 4 | Accepted answer

You could try adding something like the following to the end of your template. This is assuming you only have 2 locales.
{# test for the current entry locale (i.e. spanish) #}
{% if entry.locale = 'es' %}

    {# retrieve the same entry in the original locale #}
    {% set localizedEntry = craft.entries.id(entry.id).locale('en') %}

    {# compare the body content, and append additional content #}
    {% if localizedEntry[0].body == entry.body %}
        Sorry, not translated yet.
    {% endif %}

{% endif %}

> **Comments:**
> **username_0**: Cool. Could you explain what is exactly happening here? What does `[0]` do?  
> **username_1**: `craft.entries` returns an ElementCriteriaModel that essentially acts like an array of entries, even if it only has 1 entry. `[0]` or `.first` returns the first item in the array.  
> **username_1**: In this case, you could also use: `{% set localizedEntry = craft.entries.id(entry.id).locale('en').first %}` and then wouldn't need the `[0]` in the `if` statement.  

---

