Add "Content language selected for page" default language option

Created on 12 April 2022, almost 3 years ago
Updated 16 February 2023, about 2 years ago

Problem/Motivation

This issue adds a Content language selected for page option for default language setting on translatable entity types.

Here is one use case I have in mind:

When I select Swedish in the Language selection widget, I still see taxonomy, menu etc in English. To solve this I can reconfigure the content type setting to have Author's preferred language or Interface text language selected for page option, but this also requires the user to change their preference to another language, or having the whole UI shown in another language.

If I have created a page in English, and then translate it to e.g. Swedish, I do see the taxonomy, menu etc in the the language I'm trying to translate to.

To be able to solve this, we can add a Content language selected for page default language option, which allows us to show the form in a specific language without having to modify the interface language, or require the user to change its preference on a separate UI.

How the language selection applies the language change (e.g. using a parameter in the URL, or language prefix etc) is a implementation detail, and can be done in a contrib/custom module or in a follow up issue.

User interface changes

The user can now select Content language selected for page as default langcode for translatable entity types. This option uses the currently detected content language.

API changes

N/A

Data model changes

N/A

Release notes snippet

Feature request
Status

Needs work

Version

10.1

Component
Language system 

Last updated 2 days ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇸🇪Sweden johnwebdev

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

  • Needs usability review

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India sonam.chaturvedi Pune

    Verified MR !2106 on 10.1.x-dev. MR applied with two offsets.

    Checking patch core/modules/language/language.module...
    Checking patch core/modules/language/src/Element/LanguageConfiguration.php...
    Checking patch core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php...
    Hunk #1 succeeded at 226 (offset 13 lines).
    Checking patch core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php...
    Hunk #1 succeeded at 164 (offset 3 lines).
    Applied patch core/modules/language/language.module cleanly.
    

    Test Result:
    "Content language selected for page" option is available to select as default langcode for translatable entity types.
    Patch works fine.
    Attached screenshot for 10.1

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    Tagging for a change record has this changes the behavior by adding a new option.
    Also since it's a UX change tagging for usability.

  • Status changed to Needs work about 2 years ago
  • 🇺🇸United States smustgrave

    Oops should of changed status a week ago.

Production build 0.71.5 2024