Error Page is shown in wrong language

I have spotted a really weird behaviour with my error pages.

If I browse my site in english and enter a not existing url, I get redirected correctly to the error page. Unfortunately all the content (and navigation and everything else) there is always shown in the default language german. However the URL path is still with /en/.

Any ideas on where I need to start debugging?

I tried a few things out and it seems that everything is set up as it should be.
There is an /error folder with the content files for each language. If i hit an error, i get forwarded to the correct error site. However, everything still remains in german, and the language switcher changes to german as well. Is this potentially a bug in Kirby with multilanguage sites?

Please post your language configuration. Also, are you using any routes? Language detection? Plugins?

I’m not using any routes, language detection is on. Plugins I’m using are kirby3-xmlsitemap and uniform.
Language configurations:
‘code’ => ‘de’,
‘default’ => true,
‘locale’ => ‘de_CH’,
‘name’ => ‘Deutsch’,
‘url’ => ‘/de’,
‘translations’ => […]

‘code’ => ‘en’,
‘locale’ => ‘en_US’,
‘name’ => ‘English’,
‘url’ => ‘/en’,
‘translations’ => […]

@texnixe do you have any other ideas here?

No, I haven’t tested this myself yet, but found this issue:

I just tested this with a fresh Starterkit and can reproduce the issue.

Sorry to jump on this, but is it solved? I happen to have the same issue with the kirby 3.6.6.

Can’t reproduce this in a 3.6.6 Starterkit. What are your exact settings? and is the error page actually translated?

Hi texnixe,

Thanks for the answer, yes the page is translated in all languages.



return [
  'debug' => false,
  'languages' => true,
  'languages.detect' => true,
  'date.handler' => 'strftime',
  'smartypants' => true,
  'panel' => [
    'css' => '/assets/css/panel.css',
    'slug' => 'secret'
  'bnomei.boost.cache' => [
    'type'     => 'sqlite'
  '' => require_once 'jobs.php',
  'routes' => require_once 'routes.php',
  'thumbs' => require_once 'thumbs.php',
  'cache' => [
    'pages' => [
      'active' => true,
      'ignore' => function ($page) {
        return in_array($page->id(), ['bank', 'archives', 'agenda', 'error']);
  'hooks' => require_once 'hooks.php',
  'bnomei.sqlite-cachedriver.pragmas-construct' => [
    // your pragmas or none
    'PRAGMA read_uncommitted = true;',
    'PRAGMA busy_timeout = 10000;',
    'PRAGMA main.cache_size = 20000;',
    'PRAGMA case_sensitive_like = false',
    'PRAGMA main.auto_vacuum = INCREMENTAL;',
    'PRAGMA main.page_size = 8096;',
    'PRAGMA temp_store = MEMORY;',
  // Sitemap
  'omz13.xmlsitemap' => [
    'cacheTTL' => 60,
    'includeUnlistedWhenTemplateIs' => ['exhibitions'],
    'excludePageWhenTemplateIs' => ['events','year-press'],
    'excludeChildrenWhenTemplateIs' => [ 'events','shop'],
    'disableImages' => false,
  // Retour
  'distantnative.retour' => [
    'ignore' => ['sites', 'en/nodes', 'de/nodes'],



return [
        'pattern' => '/',
        'action'  => function () {
            $session = kirby()->session();
            if ($session->get('languages.detect', false) === false && option('languages.detect') === true) {
                $session->set('languages.detect', true);
                return kirby()
            return page();

I tried to completely remove the routes.php to see if this was causing issue, but didn’t change. That bit of code came from the issue where languages autodetect didn’t work when the default language url is set to ‘/’. To avoid to have the default language shown in the url.

Languages pages:

return [
  'code' => 'fr',
  'default' => true,
  'direction' => 'ltr',
  'locale' => 'fr_FR.utf-8',
  'name' => 'Français',
  'url' => '/',
  'translations' => […]
return [
    'code' => 'en',
    'default' => false,
    'direction' => 'ltr',
    'locale' => 'en_US.utf-8',
    'name' => 'English',
    'url' => 'en',
    'translations' => […]
return [
    'code' => 'de',
    'default' => false,
    'direction' => 'ltr',
    'locale' => 'de_DE.utf-8',
    'name' => 'Deutsch',
    'url' => 'de',
    'translations' => […]

Sorry for the long post. Will try to disable other plugins in the meantime.

With a test of removing all plugins, it was still not working, I just added this on top* of my routes.php, don’t know if that’s a nasty hack but it’s a temporary solution to me:

        'pattern' => '(:all)',
        'language' => '*',
        'action'  => function ($language, $uid) {
            if(!$uid) $page = site()->homePage();
            else $page = page($uid);
            if(!$page) $page = site()->errorPage();
            return site()->visit($page, $language);

*Edit: Bottom part if you have other routing rules. This should be the last resort.