I've a D9 site, configured with two languages: Italian (default) and English.

Some content types of the site are translable, the configuration under admin/config/regional/content-language for them is as the following:

enter image description here

The configuration of admin/config/regional/language/detection is the following:

enter image description here

How it is now

When the user adds new content, if the url has en the content is created as English, and translatable in Italian.

When the url has it, the content is created in Italian and translatable in English.

How I want it to have

I'd like for coherence and to possibly avoid unforeseen problems that all the translatable content is created in Italian and translatable in English, independently of current URL\User settings.

The configuration under /admin/structure/types/manage/article is similar to the one under content-language:

enter image description here

How can I achieve that? I've tried to tamper with "Content language detection" but found no working way to set up it (and I've no idea at all if the setting to alter to achieve this result)

  • 1
    Can't it be set at example.com/admin/structure/types/manage/article at the bottom under language settings? – leymannx Apr 21 at 17:17
  • @leymannx: I've updated the answer, the default language there was already in "italian". Actually I'm pretty positive the settings under a specific content type are the same of the "general list" under 'admin/config/regional/content-language'. – Giuseppe Apr 22 at 7:46
  • 1
    Seems you already have the right settings for it. Is this not working? Like when you show the language selector just for testing and create a new article, it isn't in Italian independent from the current interface language? Or is it that you want to switch the source language for already existing article? – leymannx Apr 22 at 9:05
  • @leymannx: it is not working. I'll repeat the case: the editor is in "English" - he has likely set up the current language via the switcher available in the frond-end theme. Then, he adds a new 'article' (the theme is admin). That article will have 'EN' as default language and 'IT' as translation - so the settings does not work. I've realized this problem\bug after users started to create nodes. My priority is to fix this problem for new nodes, I think the site can work with the existing having this problem - although as you're asking, I'd like to swap the language for those too if possible. – Giuseppe Apr 22 at 9:58
  • 1
    As a quickfix you should simply expose the language selector and move it to top of the form. I can't replicate what you describe in a fresh Drupal installation. Interface language is respected. Must be something else in your setup that's interferring. – leymannx Apr 22 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.