Skip to content
i18ncontent.install 1.07 KiB
Newer Older
 * @file
 * Installation file for i18ncontent module.
function i18ncontent_install() {
  // Create strings in the extended localization system.
  // There seems to be some issue with module loading on install/update.
Alexander Hass's avatar
Alexander Hass committed
 * Implementation of hook_enable().
 */
function i18ncontent_enable() {
  i18ncontent_locale_refresh();
}
 * Implementation of hook_disable().
 * This function depends on i18nstrings, so it must be run on _disable() better than uninstall().
  // Remove and restore help texts.
  foreach (node_get_types() as $type) {
    if (!$type->help && ($help = ts("nodetype:$type->type:help", $langcode))) {
      $type->help = $help;
      node_type_save($type);
    }
  }
  // @ TODO Some more clean up for strings
}

/**
 * The old module with the same name had a different approach, so the update will be full install.
 */
function i18ncontent_update_1() {
  $ret = array();
  drupal_load('module', 'i18ncontent');