How to fix translations from a migrated D7 websites

When you migrate a multilingual website from Drupal 7 to Drupal 8 there are some actions you need to perform in order to make it work correctly.

First you need to make sure that the following modules in Drupal 8 are enabled:

  • Configuration Translation
  • Content Translation
  • Interface Translation

Then you need to enable the language switcher. Go to Structure->Block layout. Click on Place block in Header section, find Language switcher in the list and click Add custom block. The language switcher should be visible now at the top on the right of your menu.

The language switcher should display the available languages with two letters (e.g. EN, FR). There are some cases where, after the migration, the language names are displayed in full (e.g. English, French). In order to fix this go to Configuration and under the Regional and Language section click on Languages. Edit the available languages and change the value in the name field from full language name ‘English’ to ‘En’. Do this for all the available languages. Now the language switcher should display the values properly.

Then click on the Detection and selection tab and make sure that only the detection methods URL and selected language are checked.

Once you have done all these changes, clear the caches and your site is ready.

1 Like