Sorry, we don't support your browser.  Install a modern browser

Language autodetect: fallback language option#253

Based on Sebastian Eberleins suggestion here: https://github.com/getkirby/ideas/issues/143

  • German editors
  • Multilangual Setup with German and English

Editors start a new page in German, then translate to English. English is set as the default language though so that for example Swedish visitors get redirected to English translation. Feels unnatural though to start a new page in English. My personal solution is a fallback language option:

I changed the last return statement of the detectLanguage method in Cms/App.php:

if ($fallbackLanguage = $languages->findBy('code', $this->option('languages.fallback'))) {
    return $fallbackLanguage;
} else {
    return $this->defaultLanguage();
}

And set 'languages.fallback' => 'en' in my config.php.

Maybe this makes sense for the core.

a month ago