You are here

webform_translation.install in Webform Translation 7

File

webform_translation.install
View source
<?php

/**
 * Implements hook_schema().
 */
function webform_translation_schema() {
  $schema = array();
  $schema['webform_component_translation'] = array(
    'description' => 'Table for storing webform component translations.',
    'fields' => array(
      'nid' => array(
        'description' => 'The node identifier of a webform.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'cid' => array(
        'description' => 'The identifier for this component within this node, starts at 0 for each node.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => FALSE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => "Language code, e.g. 'de' or 'en-US'.",
      ),
      'translations' => array(
        'description' => 'Serialized array with all translations.',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
      'cid',
      'language',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
webform_translation_schema Implements hook_schema().