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