You are here

function _languagefield_settings_options in Custom Language field 7

Helper function for the formatter and widget options. @param: $usage: languageicons do not work in widget. The icon-option will be omitted for Widgets, not for Formatters

3 calls to _languagefield_settings_options()
languagefield_field_formatter_settings_form in ./languagefield.module
Implements hook_field_formatter_settings_form().
languagefield_field_formatter_settings_summary in ./languagefield.module
Implements hook_field_formatter_settings_summary().
languagefield_field_settings_form in ./languagefield.module
Implements hook_field_settings_form().

File

./languagefield.module, line 596
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_settings_options($usage = 'formatter') {
  $options = array();
  if ($usage != 'widget' && module_exists('languageicons')) {
    $options += array(
      'icon' => t('Language icon'),
    );
  }
  $options += array(
    'iso' => t('ISO 639-code'),
    'name' => t('Name'),
    'name_native' => t('Name and native'),
  );
  return $options;
}