Skip to main content
GrN.dk

Main navigation

  • 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

 

  • Portfolio
  • About Greg Nowak
  • Gregs IT and Logistics Optimization
  • Shrink PDF In Linux
  • Running Linux on T450s T495s T14, Thinkpads and Others
RSS feed

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