You are here

function languagefield_field_info in Custom Language field 7

Implements hook_field_info().

File

./languagefield.module, line 21
Provides a list of languages from ISO 639 standard. All variables of a $language-object can be found here: http://api.drupal.org/api/drupal/developer--globals.php/global/language

Code

function languagefield_field_info() {
  return array(
    'language_field' => array(
      'label' => t('Language'),
      'description' => t('This field stores a language reference in the database.'),
      'settings' => array(
        'enabled' => array(
          LANGUAGEFIELD_LANGUAGES_ALL => LANGUAGEFIELD_LANGUAGES_ALL,
        ),
        'format' => array(
          'name' => 'name',
        ),
        'languages' => array(),
        'excluded_languages' => array(),
        'groups' => '',
      ),
      //      'instance_settings' => array(
      //                               'format' => array('name' => 'name'),

      ////                             'text_processing' => 0,  // avoids error from text.module: function _text_sanitize()

      //                             ),
      'default_widget' => 'options_select',
      'default_formatter' => 'language_default',
      'property_type' => 'text',
    ),
  );
}