Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

How to display a 404 error for a page that is not translated

Started by Daniel 5 years ago · 0 replies · 335 views
5 years ago

How can I redirect an untranslated page to a 404 error?

YAML
languages:
  supported:
    - en
    - cs
    - sk
  default_lang: null
  include_default_lang: false
  include_default_lang_file_extension: true
  translations: true
  translations_fallback: false
  session_store_active: false
  http_accept_language: false
  override_locale: false
  pages_fallback_only: false

Is there any way to get a 404 error if the page isn't translated in that language? (although it is in supported languages)
For example, I have /en/welcome only in English language, so when i enter the url /cs/welcome, I want to display an error and not page in the default English.
Is it possible to set this in the administration?

Thank you very much for any help

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 10 hours ago
General · by pamtbaau, 15 hours ago
1 51 15 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago