Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

How to Change the Default Text Strings in Drupal 8

Parent Feed: 
How to Change the Default Text Strings in Drupal 8

Drupal 8.5 is available now, and we covered some of the key new features.

However, some smaller, but very useful features arrived with 8.5. For example, it's now much easier to translate the default text.

A few years ago, we explained how to translate the default text in Drupal 7. The process was painful! Let me show you how much easier it is in Drupal 8.5.

First, go to the "Extend" tab and enable the "Interface Translation" and "Language" module:

enable multilingual modules 

  • Next, go to "Configuration", then "Languages".
  • Click "Edit" next to "English" (or whatever your site's default language is).
  • Select the box, "Enable interface translation to English".
  • Click "Save language".

enable interface translation

  • Next, go to "Configuration", then "User interface translation".
  • You can search for and translate language strings directly from this screen. In this example, I'm changing "Weight" to "Gravity".
  • Click "Save translations".

string translation

That's really all there is to the process. It's much, much easier than in Drupal 7. Here is my translated text live on the site:

translated string


About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web