Skip to content

Instantly share code, notes, and snippets.

@mlutfy
Last active April 24, 2024 13:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlutfy/647e6325a09079e4f08f273af64900d9 to your computer and use it in GitHub Desktop.
Save mlutfy/647e6325a09079e4f08f273af64900d9 to your computer and use it in GitHub Desktop.
CiviCRM: rebuild multilingual views
# Drupal 7
drush php-eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'
# Drupal 8
drush php-eval '\Drupal::service('civicrm')->initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'
# WordPress
wp eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'
@adixon
Copy link

adixon commented Sep 12, 2017

Just what I needed today, thanks!

@shaneonabike
Copy link

Wooooa life saver!

@MegaphoneJon
Copy link

Thank you @mlutfy!

@mlutfy
Copy link
Author

mlutfy commented Apr 23, 2018

In CiviCRM 5.1, there will be a new API for rebuilding the multi-lingual schema: civicrm/civicrm-core#11967

drush cvapi System.rebuildmultilingualschema

wp civicrm api System.rebuildmultilingualschema

(Thanks to @seamuslee001)

@hansrossel
Copy link

cv php:eval 'CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_FR"], NULL);'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment