Skip to content

Limit a collection (and its pages) to specific languages #318

Description

@ysamcode

Feature request

Allow a collection (e.g. Blog) to be restricted to one or more specific languages — for example, only the default/main language — and hidden for all other locales.

Problem

On multilingual sites, every collection is currently available across all locales. Some content doesn't need (or shouldn't have) translations. A user may keep their Blog only in the main language, but right now there's no way to scope a collection to a subset of languages. This leads to:

  • Empty or fallback (untranslated) blog content surfacing under non-default locales
  • Localized collection/dynamic-page URLs existing for languages that have no real translated content
  • Those URLs being included in the sitemap + hreflang clusters, which can create duplicate/thin-content signals for search engines

Proposed solution

Add a per-collection language scope setting, e.g.:

  • Available in: All languages (default) / Selected languages
  • When "Selected languages" is chosen, pick which locales the collection is enabled for (at minimum, "default language only")

When a collection is restricted, for any excluded locale:

  • Hide the collection's dynamic pages and CMS-bound content from that locale
  • Return 404 (or redirect to the default locale) for the excluded localized URLs
  • Exclude those URLs from sitemap.xml and from hreflang alternates
  • Optionally hide the collection from the language switcher context where it doesn't apply

Open questions

  • Should this be configured at the collection level, the dynamic-page level, or both?
  • For excluded locales, is the preferred behavior a 404 or a redirect to the default-locale equivalent?
  • Should individual collection items also be scopeable per language, or only the whole collection?

Context

Requested by a user who wants to keep their Blog in the main language only and hide it for other languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions