mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Added deprecation notice when using system.pages_fallback_only
This commit is contained in:
parent
7f0e51f92f
commit
972d32c969
|
|
@ -21,13 +21,13 @@ languages:
|
|||
default_lang: # Default is the first supported language. Must be one of the supported languages
|
||||
include_default_lang: true # Include the default lang prefix in all URLs
|
||||
include_default_lang_file_extension: true # If true, include language code for the default language in file extension: default.en.md
|
||||
pages_fallback_only: false # Only fallback to find page content through supported languages
|
||||
translations: true # If false, translation keys are used instead of translated strings
|
||||
translations_fallback: true # Fallback through supported translations if active lang doesn't exist
|
||||
session_store_active: false # Store active language in session
|
||||
http_accept_language: false # Attempt to set the language based on http_accept_language header in the browser
|
||||
override_locale: false # Override the default or system locale with language specific one
|
||||
content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']}
|
||||
pages_fallback_only: false # DEPRECATED: Use `content_fallback` instead
|
||||
|
||||
home:
|
||||
alias: '/home' # Default path for home, ie /
|
||||
|
|
|
|||
|
|
@ -414,6 +414,8 @@ class Language
|
|||
$fallback_languages = [];
|
||||
|
||||
if (null === $fallback && $this->config->get('system.languages.pages_fallback_only', false)) {
|
||||
user_error('Configuration option `system.languages.pages_fallback_only` is deprecated since Grav 1.7, use `system.languages.content_fallback` instead', E_USER_DEPRECATED);
|
||||
|
||||
// Special fallback list returns itself and all the previous items in reverse order:
|
||||
// active: 'v2', languages: ['v1', 'v2', 'v3', 'v4'] => ['v2', 'v1', '']
|
||||
if ($includeDefault) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user