Multilingual site results in configuration having different langcodes

Created on 30 January 2024, about 1 year ago

Problem/Motivation

Hello, I am still not sure if this is a bug or just the normal behaviour of Drupal.

I have a multilanguage site with Content and Config translation modules enabled. The default language of the site is Icelandic and the secondary language is English. I've always heard the langcode of config files should match the langcode of the default language.

But at the moment, I have a mix of langcodes in my config folder. If I'm using English language in the UI and I just create a new field, the config exported has "en" langcode and not "is".

I'd like to understand why it works this way if this is not a bug. I'm confused, since locale module forces configuration to be updated to the default language when a new module is installed. I think configs should be created in the site default language code and translated to any other language using config translation. The current user interface language should not matter and can produce errors like this:

Steps to reproduce

- Install a clean 12.2.* Drupal and set language "Icelandic" (Íslenka). This is going to be the default language.
- Once installed, enable language English.
- Enable module Config translation and Content translation.
- Export configuration.
- Change the UI language to English and go to page /en/admin/structure/types/add and create a new node type.
- Export configuration.
- You will see the new created node.type.x has "en" langcode and not "is".

Thanks in advance!

πŸ› Bug report
Status

Active

Version

10.2 ✨

Component
ConfigurationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ͺπŸ‡ΈSpain missvengerberg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024