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

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

Started by Daniel 5 years ago · 0 replies · 387 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 Hanns Mattes, 3 weeks ago
1 266 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 195 3 weeks ago
General · by Jerry Hunt, 3 weeks ago
2 331 3 weeks ago
General · by pamtbaau, 3 weeks ago
1 253 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 221 3 weeks ago