You are here

i18nprofile.install in Internationalization 5

File

i18nprofile/i18nprofile.install
View source
<?php

/**
 * Set language field in its own table
 * Do not drop node.language now, just in case
 * TO-DO: Drop old tables, fields
 */
function i18nprofile_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {i18n_profile_fields} (\n  `fid` int(10) NOT NULL,\n  `language` varchar(10) NOT NULL default '',\n  `title` varchar(255) default '',\n  `explanation` text,\n  `page` varchar(255) default '',\n  `options` text,\n   PRIMARY KEY  (`fid`, `language`)\n   ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
    case 'pgsql':
      drupal_set_message("PGSQL automatic install is not supported for i18nprofile module");
      break;
  }
}

/**
 * Update table to utf-8
 */
function i18nprofile_update_1() {
  return _system_update_utf8(array(
    'i18n_profile_fields',
  ));
}

Functions

Namesort descending Description
i18nprofile_install Set language field in its own table Do not drop node.language now, just in case TO-DO: Drop old tables, fields
i18nprofile_update_1 Update table to utf-8