i18nviews.install 662 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * Installation file for Internationalization Views (i18nviews) module.
  5. */
  6. /**
  7. * Automatically enable/disable i18nviews in views settings
  8. *
  9. * No further install needed. We're using i18n schema and API.
  10. */
  11. /**
  12. * Implements hook_enable().
  13. */
  14. function i18nviews_enable() {
  15. // enable i18nstrings as views translation method
  16. variable_set('views_localization_plugin', 'i18nstrings');
  17. }
  18. /**
  19. * Implements hook_disable().
  20. */
  21. function i18nviews_disable() {
  22. // disable i18nstrings as views translation method, switch to core
  23. if (i18nviews_localization_plugin_enabled()) {
  24. variable_set('views_localization_plugin', 'core');
  25. }
  26. }