Change default language code

It has probably been answered before, but I am not sure.

I’ve installed the site, installed the panel (and set it to my language) and then started filling the boilerplate install.
Except for: I forgot to remove the default English and install the new Dutch.
So the whole site is now in Dutch with the language set to English.

Can I just change the language files?

So basically change en.txt to nl.txt

<?php

return [
    'code' => 'en',
    'default' => true,
    'direction' => 'ltr',
    'locale' => [
        'LC_ALL' => 'en_US'
    ],
    'name' => 'English',
    'translations' => [

    ],
    'url' => '/'
];

to

<?php

return [
    'code' => 'nl',
    'default' => true,
    'direction' => 'ltr',
    'locale' => [
        'LC_ALL' => 'nl_BE'
    ],
    'name' => 'Nederlands',
    'translations' => [

    ],
    'url' => '/'
];

or will I be in trouble?

You need to be careful. Make a backup before you try anything.

But let me get this right. So you have currently two languages defined in /site/languages, de and nl? Which sort of content file extension has the Dutch content now?

Only one language. My panel language was set in Dutch, but the site settings were still in English (I forgot to change those). In the meanwhile I filled the site with Dutch content. I don’t want to start over :roll_eyes:. I know changing languages is delicate on Kirby. So I wanted to check before I do so. So one language in site/languages: en. But should be nl.

Ok, thanks, but what I really wanted to know is what language extension the content files have, not language code, en.txt?

example:
layout.en.txt

Which at this point I can still change one by one if needed.

Yes, that would then be the way forward, change all content filenames to use the extension nl.txt instead of en.txt and change the language file in site/languages to nl

Thanks for your help!