You are here

i18nstrings.install in Internationalization 5

Same filename and directory in other branches
  1. 5.2 experimental/i18nstrings.install

File

experimental/i18nstrings.install
View source
<?php

function i18nstrings_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("\nCREATE TABLE  {i18n_locale_strings} (\n  `strid` varchar(100) NOT NULL,\n  `locale` varchar(12) NOT NULL,\n  `text` text NOT NULL,\n  PRIMARY KEY  (`strid`,`locale`)\n)  /*!40100 DEFAULT CHARACTER SET UTF8 */ \n");
      break;
    default:
      drupal_set_message(t('Database type not supported. This module, i18nstrings, needs manual installation.'));
  }
}

/**
 * Change table name for smooth 6.x update:
 */
function i18nstrings_update_1() {
  $ret = array();
  $ret[] = update_sql("RENAME TABLE {i18n_strings} TO {i18n_locale_strings}");
  return $ret;
}

/**
 * Implementation of hook_uninstall().
 */
function i18nstrings_uninstall() {
  db_query('DROP TABLE {i18n_locale_strings}');
}

Functions

Namesort descending Description
i18nstrings_install
i18nstrings_uninstall Implementation of hook_uninstall().
i18nstrings_update_1 Change table name for smooth 6.x update: