Drupal Advent Calendar day 14 - Multilingual and Concurrent Editing

By lostcarpark_admin, 14 December, 2024
Door 14 revealing three speech bubbles with different language scripts

Welcome to another door of the Starshot focused Drupal Advent Calendar. This might be that day when you open the door and there’s an odd-shaped piece of chocolate, and you’re not quite sure what it’s supposed to represent. Starshot, like any large project, has some tracks that have advanced more than others, and it’s only natural that some tracks are still at an early stage. Today we are taking a brief look at a couple of those tracks, along with some tasty bonus information.

Multilingual Track

Drupal has excellent support for translation and multilingual websites in core. However, it can be difficult to understand how to set up and configure a multilingual site optimally, so Drupal CMS aims to simplify this process.

The current roadmap proposes two recipes. The first of these will set up basic multilingual settings, ask the user to select the language they want to use, configure the method the site will use, and set up a language switcher block. The second recipe will make content translatable.

The sticking point at the moment is the mechanism for passing input to a recipe (such as the required language) has still to be decided.

This track is currently postponed, but hopefully it will receive attention soon. Pavlos Daniel was working on this track.

Concurrent Editing

The ability to allow multiple users to collaboratively edit a page together is not something every site requires, but having it available opens up amazing possibilities for content editors.

The current default editor in Drupal, CKEditor, already supports concurrent editing, but only in its premium version. It also only allows collaboration on fields edited by CKEditor, which is usually only the main body content.

At DrupalCon Portland, George DeMet, Tanya Nascimento, and Alex Jones demonstrated EditTogether by Palantir. This shows an impressive capability for editing all the content fields together.

It will be great to see this sort of capability in DrupalCMS. However, work on this has been postponed for now, largely because Experience Builder (which we’ll talk about later) will have a big impact on how it operates.

Bonus: Subtree Split - everything in one place, as separate pieces

One of the advantages of Drupal CMS is that many of the recipes it provides can be installed separately, so are available for your existing Drupal site. For example, you can install the Events recipe with Composer as follows: composer require drupal/drupal_cms_events.

However, if you go to drupal.org/project/drupal_cms_events, you will see that there is no issue queue, only an autogenerated release history created by the Drupal CMS bot.

Screenshot of the Drupal CMS Bot user page

So where do you go to contribute to the code? Or file issues?

You go to drupal.org/project/drupal_cms, where ALL parts of Drupal CMS are developed. If you look at that repo, you see there is a /recipes/drupal_cms_events directory, and that’s where the event recipe lives. You file MRs against the full Drupal CMS repository.

Under the hood, the various pieces get sent off to the little endpoints so that you, as the end user, can mix and match parts of Drupal CMS. Rather than always use the monolith.

This is how Symfony works too. It’s a giant ecosystem of libraries, but you can choose which libraries you want in your project. (And it is worth noting that even Drupal core uses a set-up like this, for certain things). Drupal CMS’s set-up means you can choose which recipes you want to bring into your project, and you can bring parts of Drupal CMS into non-Drupal CMS projects.

So is Drupal CMS an ecosystem of recipes? Or one singular product? The answer is that it is both.

Most people will start with the One Big Product that has all the recipes, since it’s “batteries included”. But folks who already have sites can easily use parts of Drupal CMS for their own purposes, without needing to get the One Big Thing, or even start on the One Big Thing. 

Adam's Slack profile picture, showing a cute animal in a treeThanks to Adam G-H for the bonus content. He is a Staff Software Engineer on Acquia’s Drupal Acceleration Team. He co-maintains several parts of core, including the recipe system, and he is a committer to Drupal CMS. Living in Massachusetts, he likes playing bass and bike touring.

Comments

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.