Skip to main content
GrN.dk

Main navigation

  • Articles
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

Drupal 8: Change Existing Content Language Safely

By Greg Nowak. Last updated 2026-07-08.

If you inherited a Drupal 8 site and the organisation now wants existing English content to become Swedish source content, treat the job as a controlled legacy-data repair. It is not the same as translating content, and it is not a safe one-click change in the language settings.

The distinction matters for business owners, operations leads, and agency teams because a language code is part of Drupal's content model. It can affect editorial screens, Views, search indexes, feeds, API responses, and any custom integration that filters by language. As of 8 July 2026, Drupal 8 has also been unsupported for years, so this work should be scoped like production maintenance on a legacy platform.

Situation Working Assumption Safer Route
One-language Drupal 8 site, content was entered in the wrong source language You are relabelling existing source content Use staging, backups, explicit SQL, and editorial sign-off
The site needs real English and Swedish versions You are not relabelling; you are translating Use Drupal content translation or a migration plan
Custom entities, moderation, search, or API consumers are involved Language is part of workflow and integration logic Inventory affected tables and test real user journeys
The site has no supported upgrade path The language fix may be a temporary repair Consider bundling the cleanup into a Drupal upgrade plan
A practical decision matrix before changing language data on a legacy Drupal 8 site.

First Decide What You Are Really Changing

Drupal documentation warns against changing the default language after content has already been added. That warning is there because language is not just a label on a settings page. Existing content, translated fields, configuration, and language-aware queries may already depend on the old value.

For a simple inherited site, the real task may be narrower: existing content says en, but the content is actually Swedish and should be treated as sv. That is a source-language relabel. If the business expects both English and Swedish versions, do not use this shortcut. Build a translation workflow instead.

Audit Before You Touch SQL

The old advice to export a few tables, replace en with sv, and import again is too broad for a live Drupal site. A blind replacement can change configuration, serialized data, translation metadata, or third-party records you did not intend to touch.

Start with a clone of production, a full database backup, and a list of affected entity types. At minimum, review nodes, taxonomy terms, revisions, menus, redirects, URL aliases, search indexes, and custom entities. On common MySQL or MariaDB hosting, this discovery query helps identify tables that carry language metadata:

SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
  AND COLUMN_NAME IN ('langcode', 'default_langcode', 'content_translation_source')
ORDER BY TABLE_NAME, COLUMN_NAME;

Use that list to write a reviewed SQL file. Do not make the production database the place where you improvise.

A Safer SQL Shape

For a basic Drupal 8 site where existing English-labelled node and taxonomy content should become Swedish-labelled source content, the core table updates often start like this:

UPDATE node SET langcode = 'sv' WHERE langcode = 'en';
UPDATE node_field_data SET langcode = 'sv' WHERE langcode = 'en';
UPDATE node_revision SET langcode = 'sv' WHERE langcode = 'en';
UPDATE node_field_revision SET langcode = 'sv' WHERE langcode = 'en';

UPDATE taxonomy_term_data SET langcode = 'sv' WHERE langcode = 'en';
UPDATE taxonomy_term_field_data SET langcode = 'sv' WHERE langcode = 'en';
UPDATE taxonomy_term_revision SET langcode = 'sv' WHERE langcode = 'en';
UPDATE taxonomy_term_field_revision SET langcode = 'sv' WHERE langcode = 'en';

-- Review field storage tables separately.
-- Examples: node__field_body, node_revision__field_body,
-- taxonomy_term__field_* and taxonomy_term_revision__field_*.

The comments are important. Drupal stores translated field values in field tables, and custom fields can carry their own langcode. Review them by table and by field. Do not blindly rewrite default_langcode or content_translation_source; those columns describe translation state, not only human language.

Run It Like Maintenance, Not a Console Trick

Use the project-local Drush version from the Drupal root or the correct site alias. On multisite, pass the right alias or --uri. Keep the SQL in a file so the team can review it and repeat it on staging and production.

vendor/bin/drush sql:dump --result-file=../before-language-change.sql
vendor/bin/drush sql:query --file=change-language.sql
vendor/bin/drush cache:rebuild -y

# Only during a normal deploy with pending database updates:
vendor/bin/drush updatedb -y

Running updatedb is not required just because you changed language rows. Use it only when this work is part of a planned code deploy with pending database updates.

Checks Before Sign-Off

  • Open a sample of nodes, taxonomy terms, and revisions in the admin UI.
  • Create new content and confirm it uses the expected language defaults.
  • Test Views, menus, URL aliases, search pages, feeds, and API responses.
  • Ask an editor to complete one real workflow, including save, preview, publish, and rollback if relevant.
  • Check logs for language negotiation, access, or search indexing errors.

The practical takeaway is simple: changing Drupal 8 content language is possible, but it should be handled as a small migration with a rollback path. If the site is still important to the business, use the work to decide whether the sensible next step is a contained repair, a multilingual cleanup, or a supported Drupal upgrade.

Need a practical second opinion before anyone touches production? Get Greg involved early and turn the language cleanup into a planned, testable maintenance task.

Related on GrN.dk

  • MariaDB 10.6 EOL: quiet CMS hosting debt needs a real upgrade plan before July 2026
  • Google’s August 18, 2026 Content API Cutoff: Feed Cleanup Before Merchant API Migration
  • Drupal 8 Development in 2026: Safe Legacy Work and Upgrade Planning

Need help with this kind of work?

Get help with a Drupal language cleanup Get in touch with Greg.

Sources

  • Install a language | Drupal.org Multilingual guide
  • Translating content | Drupal.org Multilingual guide
  • Drupal 8 is now end-of-life - PSA-2021-11-30
  • class Node | Drupal API 8.9.x
  • sql:query - Drush 13 command docs
Last modified
2026-07-08

Tags

  • Drupal 8
  • Multilingual
  • Drupal Migration
  • Drush
  • Legacy Drupal

Review Greg on Google

Greg Nowak Google Reviews

 

Hand-drawn sketch infographic summarizing: WordPress Speculative Loading Needs a Cart, Analytics, and Cache Test
WordPress Speculative Loading Needs a Cart, Analytics, and Cache Test
2026-06-24

WordPress 6.8 adds cautious speculative loading. Before enabling stronger prerendering, test cart state, analytics, personalization, and cache load.

Hand-drawn sketch infographic summarizing: ChatGPT Is Becoming Office Software: Put Admin Hygiene First
ChatGPT Is Becoming Office Software: Put Admin Hygiene First
2026-06-24

ChatGPT now has files, sessions, apps, and scheduled work. Treat it like office software: audit access, clean up retained data, and limit risk.

Hand-drawn sketch infographic summarizing: Search Console Can See Social Posts—Your Reports Need a New Map
Search Console Can See Social Posts—Your Reports Need a New Map
2026-07-13

Search Console now reports how social posts perform across Google. Here’s a practical way to manage properties, permissions, baselines and exports.

Hand-drawn sketch infographic summarizing: WordPress Now Speaks AI; Plugins Still Need Real Guardrails
WordPress 7.0 Has an AI Client. Plugins Need Their Own Guardrails
2026-07-12

WordPress 7.0 standardizes how plugins call AI providers, while leaving developers responsible for access control, cost limits, capability checks and graceful failures.

Hand-drawn sketch infographic summarizing: AI images need a media-library audit before they reach clients
AI images need a media-library audit before they reach clients
2026-06-24

AI-generated images can carry provenance signals, but CMS resizing, plugins, and CDNs may change them. Audit the media path before delivery.

Hand-drawn sketch infographic summarizing: AI disclosure rules belong in the CMS, not a spreadsheet
AI disclosure rules belong in the CMS, not a spreadsheet
2026-06-26

AI-assisted publishing needs visible disclosure choices, review evidence, and SEO checks inside the CMS, not in a side spreadsheet.

Hand-drawn sketch infographic summarizing: The risky part of AI workflow pilots is often the OAuth screen
The risky part of AI workflow pilots is often the OAuth screen
2026-06-26

AI workflow pilots can fail at the access layer. Review OAuth scopes, API keys, service accounts, and revocation paths before launch.

Hand-drawn sketch infographic summarizing: AI crawler permissions now belong in a licensing register
AI crawler permissions now belong in a licensing register
2026-06-27

AI crawler controls now affect search visibility, AI answers, model training, and licensing. A register keeps policy, evidence, and enforcement aligned.

Hand-drawn sketch infographic summarizing: Google’s AI Search toggle needs a test plan, not a gut decision
Google’s AI Search toggle needs a test plan, not a gut decision
2026-07-11

Google’s AI Search control creates a measurable publishing choice. Test visibility, traffic and leads before changing the setting across your site.

Hand-drawn sketch infographic summarizing: WordPress headless menus need an exposure check before launch
WordPress headless menus need an exposure check before launch
2026-06-28

WordPress 6.8 helps headless builds expose menu data through the REST API, but agencies should review exactly what becomes public before launch.

More articles
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.