I've found a problem translating contents into another language in a particular scenario. Those are the steps to reproduce the problem (tested on simplytest.me):

1.- New Drupal 8.2.5 installation in Spanish with the standard profile.
2.- Enable Content Translation module.
3.- Set a content type to be translatable, for example, the page content type.
4.- Add the English language.
5.- Go to language detection and selection settings (admin/config/regional/language/detection) and enable "Account administration pages", "URL" and "Browser" detection methods, with that exact order.

6.- Go to admin account settings (user/1/edit) and set "Administration pages language" to Spanish.

With that configuration, if you create a new page node in Spanish, then, when you go to translation page for that node and adds an English translation, a locale combo appears in translation edit, in which the only possible value is Spanish. If you save the translation it seems that it creates a redundant translation into Spanish. If you navigate to /en/node/1 it appears in Spanish. Neither you can't edit the English translation.

If you still have an existing translation, it results in data loss for the translated content.

As a temporary solution, I've solved the problem configuring the "URL" detection method above "Account administration pages" detection method, but the administration pages language setting, obviously, has no effect.

Comments

skuark created an issue. See original summary.

skuark’s picture

Issue summary: View changes
skuark’s picture

Issue summary: View changes
cilefen’s picture

Title: Can't translate a content into a language different of the administration pages language setting » Can't translate a content into a language different than that of the administration pages language setting
j-lee’s picture

Version: 8.2.5 » 8.3.x-dev

I could reproduce this issue at 8.3.7 too.

j-lee’s picture

Version: 8.3.x-dev » 8.4.x-dev

8.4 is affected as well.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

j-lee’s picture

The problem persists with Drupal 8.5

j-lee’s picture

Issue summary: View changes
valthebald’s picture

Version: 8.5.x-dev » 8.6.x-dev
Status: Active » Needs work
Issue tags: +Needs tests
StatusFileSize
new1.54 KB

ConfigurableLanguageManager uses single flag to check if language is initializing, while there are several language types, initialized in different ways.

Suggested solution: use array of flags instead of a single one

valthebald’s picture

Status: Needs work » Needs review
Related issues: +#2801397: Account administration pages option break multilingual

Changing to "Needs review" just to see if the patch breaks anything

josebarbosa’s picture

Same problem here. Any advance on this?
My client needs to insert content in Mandarin and it's almost impossible to manage the backend if the account administration pages option isn't enabled.

valthebald’s picture

@josebarbosa: the patch from #11 works for me

josebarbosa’s picture

Ok, thanks @valthebald. I'll give it a try.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

iztok’s picture

StatusFileSize
new196.52 KB

I had an issue when setting "Interface text language detection" and "Content language detection" seperately.
screenshot

When opening a node translation (on a URL reserved for a specific language) it opened the original English content.

The #11 patch resolved this issue for now.

laravz’s picture

I believe it is, or at the very least the patches do very similar things (except the specifics of the checks and the manner in which initializing[$type] is unset). However, issue 2189267 is older and seems to have tests. So maybe it would be best to compare the patches for the best solution and set this one to Closed(duplicate)?

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mirom’s picture

Status: Needs review » Closed (duplicate)

The patch from #2189267 is basically the same, closing as duplicate