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 Content Language

If you have a lot of content including taxonomies and you suddenly would like to change the language of the interface it is not that easy. The current solution I use is to change the default language to your desired language and then export the database. Then replace the string 'en' with your desired language code and reimport the database.

You need to export the node and taxonomy tables only.

For example: sed "s/'en'/'sv'/g" input.sql > output.sql

Or you need to build sql queries like this, not complete list:

UPDATE `node` SET langcode = 'sv' WHERE langcode = 'en'

UPDATE `taxonomy_term_data` SET langcode = 'sv' WHERE langcode = 'en'

Last modified
2020-06-24

Tags

  • Drupal 8

Review Greg on Google

Greg Nowak Google Reviews

 

  • Form Spam Is a Lead-Quality Problem: A Practical Hardening Playbook for Business Websites
  • Why Your Website's Third-Party Stack Needs Operational Ownership
  • Drupal 10 Has a December 2026 Deadline, So Upgrade Inventory Has Become a Real Client Project
  • NGINX 1.30 made connection reuse the default, which turns backend compatibility into paid work
  • AI Crawler Control for Business Websites: Protect Your Content Without Losing Search Visibility
RSS feed

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