Third option for the CKEditor 5 "Language" button: `site_configured` (in addition to `un` and `all`)

Created on 7 April 2022, over 2 years ago
Updated 16 April 2024, 8 months ago

Problem/Motivation

The CKEditor Language button currently lets sitebuilder switch between "6 official UN languages" and "All XX languages" (as of September 2023, 107 languages) in Drupal's standard language list.

For a site with a given set of languages configured, there is no option to present the list of configured languages. Custom languages added via Drupal configuration are not available via the "all" or "UN" options.

For CKEditor 4 there's an issue to also add an option to display a list of languages currently configured on the site Third option for the CKEditor 4 "Language" button: `enabled` (in addition to `un` and `all`) Needs review .

Steps to reproduce

  1. Install Drupal and enable Content translation, Language and any required modules, along with CKEditor
  2. At /admin/config/regional/language, press "Add a language"
  3. Select "Custom language" and enter "mi" for language code and "Māori" for title
  4. At /admin/config/content/formats/manage/basic_html under "CKEditor 5 plugin settings - Source editing", add <span lang dir> to the allowed tags and press Save
  5. At /admin/config/content/formats/manage/basic_html under "Toolbar configuration", drag the "Language" button to the CKEditor toolbar
  6. At /admin/config/content/formats/manage/basic_html under "CKEditor 5 plugin settings - Language", the options are "United Nations official languages" and "All 107 languages". Choose "All 107 languages" (results are same regardless)
  7. Create some content using the configured input format, and note that the custom language configured in (3) above is not available
  8. Note that even with two languages configured for the site, the UX of finding a language in a list of 107 languages is poor

Proposed resolution

Provide a third option when configuring the CKEditor "Language" button, which has CKEditor load the list of languages configured in the site (to match the list at /admin/config/regional/language).

Remaining tasks

  1. Review

User interface changes

  1. Updated options and description at /admin/config/content/formats/manage/basic_html under "CKEditor 5 plugin settings - Language"

API changes

Data model changes

Release notes snippet

Feature request
Status

Fixed

Version

11.0 🔥

Component
CKEditor 5 

Last updated about 2 hours ago

Created by

🇳🇱Netherlands ifrik

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

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.

Production build 0.71.5 2024