4

Similar with but not the same as How to use drush config:set for translations?, is there a way to scan for a site's language config changes via drush or so?

I have a lot of sites on the same server (multi-site), and I would rather check on this via a drush command than having to log in each of the sites to look at the output of /admin/config/development/configuration.

For normal config changes I could run drush cst | config-status but this doesn't appear to work for language config and puts the site at risk of accidentally wiped out language config when not captured.

Example:

configuration screen

$ drush cst -- returns nothing
$ drush cget language.fr:block.block.claro_breadcrumbs
settings:
  label: 'Breadcrumbs FR'
2
  • 2
    AFAIK, everything shown on /admin/config/development/configuration IS shown in drush cst. If you are talking about the translations that can be exported to .po files, those won't be shown by Drush, but those aren't affected by configuration import/export either. Jul 7 at 16:31
  • 1
    Thanks, I have updated the question with an example
    – baikho
    Jul 7 at 17:00
1

The config-status command doesn't show the config's relevant collection, which is how I got confused, but @Patrick Kenny is right, the output does list the language config files.

One solution would be to create a custom drush command similar to Drush\Drupal\Commands\config\ConfigCommands, and alternatively config-import does highlight the collection. So one can run drush cim | config-import without proceeding after the confirmation prompt, so you don't lose the config:

$ drush cst -- does not show collection
------------------------------- ------------ 
 Name                            State       
------------------------------- ------------ 
 block.block.claro_breadcrumbs   Only in DB 
------------------------------- ------------
$ drush cim -- does show collection
+-------------+-------------------------------+-----------+
| Collection  | Config                        | Operation |
+-------------+-------------------------------+-----------+
| language.fr | block.block.claro_breadcrumbs | Delete    |
+-------------+-------------------------------+-----------+

Import the listed configuration changes? (yes/no) [yes]:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.