Language switch not working in frontend

Hi guys,

I’m hunching over a curious problem and am at this point at a loss:

I’ve set up a multi language site in the following way:

  1. set up config files for local, stage and production

  2. put into the config

    c::set(‘debug’,true);
    c::set(‘languages’, array(
    array(
    ‘code’ => ‘en’,
    ‘name’ => ‘English’,
    ‘default’ => true,
    ‘locale’ => ‘en_US’,
    ‘url’ => ‘/en’,
    ),
    array(
    ‘code’ => ‘de’,
    ‘name’ => ‘Deutsch’,
    ‘locale’ => ‘de_DE’,
    ‘url’ => ‘/de’,
    ),
    array(
    ‘code’ => ‘es’,
    ‘name’ => ‘Español’,
    ‘locale’ => ‘es_ES’,
    ‘url’ => ‘/es’,
    ),
    array(
    ‘code’ => ‘fr’,
    ‘name’ => ‘Deutsch’,
    ‘locale’ => ‘de_DE’,
    ‘url’ => ‘/de’,
    ),
    array(
    ‘code’ => ‘cn’,
    ‘name’ => ‘中文’,
    ‘locale’ => ‘zh_CN’,
    ‘url’ => ‘/cn’,
    ),
    ));
    c::set(‘language.detect’, true);
    c::set(‘live’,false);
    c::set(‘minifyhtml’,false);

and set up a languages directory with the corresponding files (although they are all empty for now) like so:

- languages
-- cn.php
-- de.php
-- en.php
-- es.php
-- fr.php

Within Kirby everything works like a charm, editing different languages, filling in different values, saving (checked).
However, when I change to the website’s frontend, even though the url changes no other language but english only shows.

Do you have an idea what I’m missing here?

Thanks a lot,
Tom

You seem to have German twice in your config, if that isn’t a typo? (You are using a different code, but the url/language name etc. is twice Deutsch). Do all languages have content files for all languages? If not, then Kirby will fall back to the default language.

Oh boy…the duplicate of DE was it, naming it to FR did it. Thx a lot @texnixe