Allowing a new locale to fallback on content from a default locale? I am setting up a localized site that defaults to English (en_us). Alternate locales will have URLs such as example.com/fr

I would like to ensure that users browsing the French website don't accidentally end up back on the default locale. My problem is that some sections will not target the French locale but I would still like the URL to display the default, English content with the /fr/ URL.

If I uncheck targeting for that locale in my section settings, then browse to the entry (example.com/fr/section/entry) I get a 404. How can I display the default English entry content at that URL?
One solution (without needing to create a custom plugin) would be to add a lightswitch or checkbox field called useDefaultLocale, and add it to the field layout of any sections that you want to default to english. In your template you can test for the value of this field and display the default locale version of the content. You would of course need to target 'fr' locales for any sections that included this functionality.

{% if not craft.locale == 'en' and entry.useDefaultLocale %}
    {% set entry = craft.entries.section(entry.section).locale('en') %}
{% endif %}


Any content that is defined directly in the template using the translate filter (i.e. {{ 'Date'|t }} ) would still get translated of course, but maybe that's a good thing. There also may be a way to manually set the locale so as not to translate these as well, that I don't know about. If anyone knows, please leave a comment, and I'll add it to the answer.

Update: carlcs brings up a good point regarding SEO and duplicate content. To solve this you could define a canonical link using: (placed in the if clause above)

{% set canonical %}
    &lt;link rel="canonical" href="{{ entry.url }} /&gt;
{% endset %}`


and then in the _layout template head:

{% if canonical is defined %}{{ canonical }}{% endif %}


The side effect is that some French users might get directed to the english url from search engines. Pick your poison I guess.