Answers.Body: <p>So thanks to Brad I found this solution: </p>
  
  <pre><code>{# Get all entries regardless if the locale is enabled or not #}
  {% set allEntries = craft.entries.section('yourSection').status(null).localeEnabled(false).find() %}
  
  {# Set the other locale (could be done differently, but since I have only two, I chose the easy way) #}
  {% if craft.locale == 'de' %}{% set otherLocale = 'fr' %}{% else %}{% set otherLocale = 'de' %}{% endif %}
  
  {# Get all entries that are not disabled regardless if the locale is enabled or not #}
  {% for entry in allEntries if entry.enabled == 1 %}
  
      {# if the locale is turned off, search for the entry in the other language #}
      {% if entry.status == 'disabled' and entry.localeEnabled == 0 %}
  
          {# Get the same entry in the other locale #}
          {% set otherEntry = craft.entries.id(entry.id).locale(otherLocale).first() %}
  
          &lt;h2&gt;&lt;a href="{{ otherEntry.url }}"&gt;{{ otherEntry.title }} ({{ otherLocale|upper }})&lt;/a&gt;&lt;/h2&gt;
  
      {% else %}
          &lt;h2&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h2&gt;
      {% endif %}
  
  {# else (for the loop) all the entries are disabled #}
  {% else %}
      &lt;p&gt;No results&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
  <p>It works great for my case. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-22T19:16:45.017Z
Answers.Text: Glad you got it sorted!
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-22T11:11:04.413Z
Answers.LastActivityDate: 2015-09-22T11:11:04.413Z
Answers.UserDisplayName: outline4
Answers.Body: <p>From your template you can check if the entry is enabled via <a href="http://buildwithcraft.com/docs/templating/entrymodel#enabled" rel="nofollow">entry.enabled</a>.</p>
  
  <p>If an entry's locale is set to disabled (either via being disabled by default in the section's settings or manually on an entry), then the overall entry's <a href="http://buildwithcraft.com/docs/templating/entrymodel#status" rel="nofollow">status</a> will be <code>disabled</code> as well.</p>
  
  <p>If, for whatever reason, you need to see all of the locales for an entry and their <code>enabledByDefault</code> status, you can do something like:</p>
  
  <pre><code>&lt;ul&gt;
      {% for key, value in entry.getLocales() %}
          &lt;li&gt;locale = {{ key }}, enabledByDefault = {{ value['enabledByDefault'] }}
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-22T08:50:12.207Z
Answers.Text: Thanks a lot brad, my brain mixed up {{ entry.enabled }} and {{ entry.status }}. So {{ entry.status }} is 0 if {{ entry.localeEnabled }} is 0 OR {{ entry.enabled }} is 0. This is perfect! Thanks!
Answers.UserDisplayName: outline4
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-22T10:12:36.500Z
Answers.Text: I am trying to do the following: {% set entries = craft.entries.section('referenzen').status(null).localeEnabled(false).enabled('1‌​').find() %} but the enabled('1') part doesn't work. Do I have to do it differently?
Answers.UserDisplayName: outline4
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-22T04:42:23.400Z
Answers.LastActivityDate: 2015-09-22T04:42:23.400Z
Answers.UserDisplayName: Brad Bell
Body: <p>I have two languages (German and French).<br>
  In my sections I have German enabled as default language. French is off by default. </p>
  
  <p>My Problem is: 
  I always want to show content, even if the other language is disabled and, when an entry is not translated yet, show a note like "Entry not translated yet." </p>
  
  <p>I know about localeEnabled and status and I can query the following way: </p>
  
  <pre><code>{% set entries = craft.entries.section('referenzen').localeEnabled(false).status(null).find() %}
  </code></pre>
  
  <p>That outputs all of the entries.<br>
  But I am running into problems with the "_entry" template. </p>
  
  <p>And I don't really know how to differentiate between entries that have their status turned off vs. entries that only have a language turned off. </p>
  
  <p>Does anybody have a solution to this problem? </p>
  
  <p>Cheers<br>
  Stefan</p>
  
Tags: <language>
Title: How do I proceed when I want to show another language when the actual language is deactivated?
ThreadText: # How do I proceed when I want to show another language when the actual language is deactivated?
  
  (Asked by: username_0 on 2015-09-19)
  
  I have two languages (German and French).  
  In my sections I have German enabled as default language. French is off by default.
  
  My Problem is:
  I always want to show content, even if the other language is disabled and, when an entry is not translated yet, show a note like "Entry not translated yet."
  
  I know about localeEnabled and status and I can query the following way:
  
  ```
  {% set entries = craft.entries.section('referenzen').localeEnabled(false).status(null).find() %}
  
  ```
  
  That outputs all of the entries.  
  But I am running into problems with the "\_entry" template.
  
  And I don't really know how to differentiate between entries that have their status turned off vs. entries that only have a language turned off.
  
  Does anybody have a solution to this problem?
  
  Cheers  
  Stefan
  
  **Tags:** language
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-09-22. Score: 1 | Accepted answer
  
  So thanks to username_1 I found this solution:
  
  ```
  {# Get all entries regardless if the locale is enabled or not #}
  {% set allEntries = craft.entries.section('yourSection').status(null).localeEnabled(false).find() %}
  
  {# Set the other locale (could be done differently, but since I have only two, I chose the easy way) #}
  {% if craft.locale == 'de' %}{% set otherLocale = 'fr' %}{% else %}{% set otherLocale = 'de' %}{% endif %}
  
  {# Get all entries that are not disabled regardless if the locale is enabled or not #}
  {% for entry in allEntries if entry.enabled == 1 %}
  
      {# if the locale is turned off, search for the entry in the other language #}
      {% if entry.status == 'disabled' and entry.localeEnabled == 0 %}
  
          {# Get the same entry in the other locale #}
          {% set otherEntry = craft.entries.id(entry.id).locale(otherLocale).first() %}
  
          <h2><a href="{{ otherEntry.url }}">{{ otherEntry.title }} ({{ otherLocale|upper }})</a></h2>
  
      {% else %}
          <h2><a href="{{ entry.url }}">{{ entry.title }}</a></h2>
      {% endif %}
  
  {# else (for the loop) all the entries are disabled #}
  {% else %}
      <p>No results</p>
  {% endfor %}
  
  ```
  
  It works great for my case.
  
  > **Comments:**
  > **username_1**: Glad you got it sorted!  
  
  ---
  
  ### Answer by username_1 on 2015-09-22. Score: 0
  
  From your template you can check if the entry is enabled via [entry.enabled](http://buildwithcraft.com/docs/templating/entrymodel#enabled).
  
  If an entry's locale is set to disabled (either via being disabled by default in the section's settings or manually on an entry), then the overall entry's [status](http://buildwithcraft.com/docs/templating/entrymodel#status) will be `disabled` as well.
  
  If, for whatever reason, you need to see all of the locales for an entry and their `enabledByDefault` status, you can do something like:
  
  ```
  <ul>
      {% for key, value in entry.getLocales() %}
          <li>locale = {{ key }}, enabledByDefault = {{ value['enabledByDefault'] }}
      {% endfor %}
  </ul>
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks a lot username_1, my brain mixed up {{ entry.enabled }} and {{ entry.status }}. So {{ entry.status }} is 0 if {{ entry.localeEnabled }} is 0 OR {{ entry.enabled }} is 0. This is perfect! Thanks!  
  > **username_0**: I am trying to do the following: {% set entries = craft.entries.section('referenzen').status(null).localeEnabled(false).enabled('1‌​').find() %} but the enabled('1') part doesn't work. Do I have to do it differently?  
  
  ---
  
  