You are here

public function FeedsProcessor::languageOptions in Feeds 7.2

Provides a list of languages available on the site.

Return value

array A keyed array of language_key => language_name. For example: 'en' => 'English'.

6 calls to FeedsProcessor::languageOptions()
FeedsNodeProcessor::languageOptions in plugins/FeedsNodeProcessor.inc
Overrides parent::languageOptions().
FeedsProcessor::configForm in plugins/FeedsProcessor.inc
Returns configuration form for this object.
FeedsProcessor::entityLanguage in plugins/FeedsProcessor.inc
Returns the current language for entities.
FeedsProcessor::entityValidate in plugins/FeedsProcessor.inc
Validates an entity.
FeedsProcessor::getMappings in plugins/FeedsProcessor.inc
Get mappings.

... See full list

1 method overrides FeedsProcessor::languageOptions()
FeedsNodeProcessor::languageOptions in plugins/FeedsNodeProcessor.inc
Overrides parent::languageOptions().

File

plugins/FeedsProcessor.inc, line 93
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

public function languageOptions() {
  $languages = array(
    LANGUAGE_NONE => t('Language neutral'),
  );
  $language_list = language_list('enabled');
  if (!empty($language_list[1])) {
    foreach ($language_list[1] as $language) {
      $languages[$language->language] = $language->name;
    }
  }
  return $languages;
}