Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5054

Drupal 8 - Multi-site with different languages. Configuration synchronization

$
0
0

My client have 95 sites in Drupal 7 sharing a single code base. Each site has English as the default but dozens also have other languages. We're in the process of planning their move to Drupal 8 and one concern has been how we use the Drupal 8 config syncronization instead of Features and how this will effect languages. We want each site to keep their own unique languages.

Our method is as follows:

1. Install and enable the "config_ignore" module https://www.drupal.org/project/config_ignore

2. Inside the config_ignore section add language.* (Which ignores all the files starting language.* from being imported in config sync.)

3. Add to the gitignore file 'config/sync/language' and 'config/sync/language.*' (To stop the translated config files now residing in config/language/{lang_code} from being committed)

To test this I set up a Drupal 8 site on Pantheon and pulled the same code/db to my local. After making the above changes to my local I commit to the pantheon site.

Now (After running "import all" the config sync) the Pantheon D8 site has the config set. I'm ready to add a new language, in this case French, to my pantheon site.

After it's done setting up the new language I visit config sync (admin/config/development/configuration) and it shows changes made and I also see a list of language.* files being ignored. Because of the config_ignore setting I can run "import all" and it won't remove the language.

Now my Pantheon D8 site has it's unique second language (fr) and i'm ready to test. On my local I add Dutch to languages and commit those changes to my pantheon site.

My pantheon site ignores all the language changes from local and fr remains the only other language on my Drupal 8 site.

Does this sound like a solid method to handle multiple languages per site?


Viewing all articles
Browse latest Browse all 5054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>