<p>By disabling a locale for an entry you are removing the automatically created route for this entry and locale (→ <a href="http://buildwithcraft.com/docs/routing" rel="nofollow">docs for routing</a>).</p>

<p>But what you can do, is to diable the automatic routing (uncheck "Entries in this section have their own URLs" in the section settings) and add the same routes as custom <a href="http://buildwithcraft.com/docs/routing#dynamic-routes" rel="nofollow">dynamic routes</a> manually. </p>

<p><code>news/{slug}</code> →  <code>news/_entry</code></p>

<p>Those manual routes won't 404 for disabled entries and you can have some logic in your _entry.html template.</p>

<pre><code>{% set entry = craft.entries.section('news').slug(slug).first() %}

{% if not entry %}
    {% set entry = craft.entries.section('news').slug(slug).locale('en').first() %}
    {% set duplicateContent = true %}
{% endif %}

{% if not entry %}
    {% exit 404 %}
{% endif %}
</code></pre>

<p>I would also recommend to set your meta tags accordingly and make search engines aware of the duplicated content. I updated the code with a new variable definition, test if it is defined in your _layout main template.</p>

CC BY-SA 3.0
2015-10-26T05:02:02.517Z
Thanks! But all I wanted to do is get English translations if the Spanish translation is empty.
user4236
CC BY-SA 3.0
2015-10-26T05:17:06.217Z
Yeah, so this is not what you want? I think it's the only way to get around the 404 for disabled entries. Manual routes and the `exit 404` tag is no uncommon practice in Craft!
carlcs
CC BY-SA 3.0
2015-10-26T05:23:11.810Z
You could also introduced a (non translated) lightswitch field, check its value in the template and if it's enabled load the default locale's content (or 404).
carlcs
CC BY-SA 3.0
2015-10-23T12:36:24.720Z
2015-10-26T05:45:17.477Z
2015-10-26T05:45:17.477Z
carlcs
<p>I disabled translation for Spanish and it returned 404 page.</p>

<p>I set all my fields to translatable and By default craft translations are empty.</p>

<p><a href="https://i.sstatic.net/y4j9q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/y4j9q.png" alt="enter image description here"></a></p>

<p>How can I return English by default? Using Spanish locale</p>

<p><a href="https://i.sstatic.net/mJjBT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mJjBT.png" alt="enter image description here"></a></p>

<p>Thanks! :)</p>

<localization><elementcriteriamodel><language>
Craft Translation Fallback
# Craft Translation Fallback

(Asked by: username_0 on 2015-10-23)

I disabled translation for Spanish and it returned 404 page.

I set all my fields to translatable and By default craft translations are empty.

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

How can I return English by default? Using Spanish locale

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

Thanks! :)

**Tags:** localization, elementcriteriamodel, language


---

## 1 answers

### Answer by username_1 on 2015-10-23. Score: 2

By disabling a locale for an entry you are removing the automatically created route for this entry and locale (→ docs for routing).
But what you can do, is to diable the automatic routing (uncheck "Entries in this section have their own URLs" in the section settings) and add the same routes as custom dynamic routes manually. 
news/{slug} →  news/_entry
Those manual routes won't 404 for disabled entries and you can have some logic in your _entry.html template.
{% set entry = craft.entries.section('news').slug(slug).first() %}

{% if not entry %}
    {% set entry = craft.entries.section('news').slug(slug).locale('en').first() %}
    {% set duplicateContent = true %}
{% endif %}

{% if not entry %}
    {% exit 404 %}
{% endif %}

I would also recommend to set your meta tags accordingly and make search engines aware of the duplicated content. I updated the code with a new variable definition, test if it is defined in your _layout main template.

> **Comments:**
> **username_0**: Thanks! But all I wanted to do is get English translations if the Spanish translation is empty.  
> **username_1**: Yeah, so this is not what you want? I think it's the only way to get around the 404 for disabled entries. Manual routes and the `exit 404` tag is no uncommon practice in Craft!  
> **username_1**: You could also introduced a (non translated) lightswitch field, check its value in the template and if it's enabled load the default locale's content (or 404).  

---

