Multi language troubles


I’m working on a bilingual website, I built my blueprints to create en manages my pages in french and in english.

I add 'languages' => true to my config.php file as the guide says. It’s look like this :

return [
  'environment' => 'local',
  '' => false,
  'debug'  => true,
  'languages' => true,


I’ve created a folder languages with my fr.php and en.php:


return [
  'code' => 'fr',
  'default' => true,
  'direction' => 'ltr',
  'locale' => 'fr_FR.utf-8',
  'name' => 'Français',
  'url' => '/',

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


I write my site panel this way to change the label of my fields regarding the choosen languages :

      fr: Paramètres
      en: settings
    icon: settings
    columns :
      - width: 1/2
            label: Maintenance
            type: toggle
              - "on"
              - "off"
            label: SEO
            type:  headline
              fr: Auteur
              en: Author
            type:  text
            label: Description
            type:  textarea
              fr: Mots clés
              en: Keywords
            type:  tags
            label: favicon
            type: files
            max: 1
            multiple: false

But I choose my language (French or english), the fields label doesn’t change.

It’s a problem because I’ve got select fields to choose category for my pages and I want to register the category in french and in english. But with this problem I only have one language possible.

I’ve tried to solve it by deleting all my content and media folders, i still got this problem.

That is a misunderstanding. The language of labels, titles etc. defined in a blueprint with the language keys depends on the user language, not on the site language selected with the page language switcher.

Ok I understand, but there is a solution to display french or english in my select field regarding the language of the page and add to my page.en.txt or my ?

Because for the moment the option is the same neither for the english or french page.

I wrote my select field like this, thinking that will change my options translation regarde the languages off the panel…

        label: Catégorie
        width: 1/2
        required: true
        type: select
            fr: rassembler
            en: meet
            fr: vivre
            en: live

As I said, this will change the display according to the user language. Labels etc. are part of the user interface, therefore what is shown depends on the user selected language.

It probably doesn’t make sense to store values in different languages, but rather translate those option values stored in content files via translation variables.

Ok thanks I will check Translation variables.
But can I say, it’s difficult for a non developper like clients. Because his/her not gonna change his user language, but he/she whill switch french to english in the panel. And by not seign the label language switching can be none ergonomic.

What you can do:

Create a route like this:

'routes' => [
        'pattern' => 'get-options/(:any)',
        'action' => function($lang) {
            $array = [
                'de' => [
                  'rassembler' => 'rassembler',
                  'vivre' => 'vivre',
                'en' => [
                  'rassembler' => 'meet',
                  'vivre' => 'live',
            return $array[$lang];

You can even change the keys if you really want to store different values per language.

Then in your blueprint:

        label: Catégorie
        width: 1/2
        required: true
        type: select
        options: api
        api: "http://your.domain/get-options/{{kirby.language.code}}"

Thanks, I’ve tried, but I got this error : Screenshot from 2021-11-10 19-31-08

Does the route work if you open it in the browser?

It’s what it’s display in my panel in the browser. It’s seems the route doesn’t work.