protected function FeedsProcessor::entityLanguage in Feeds 7.2
Returns the current language for entities.
This checks if the configuration value is valid.
Return value
string The current language code.
3 calls to FeedsProcessor::entityLanguage()
- FeedsProcessor::entityLoad in plugins/
FeedsProcessor.inc - Loads an existing entity.
- FeedsProcessor::entityValidate in plugins/
FeedsProcessor.inc - Validates an entity.
- FeedsProcessor::newEntity in plugins/
FeedsProcessor.inc - Create a new entity.
File
- plugins/
FeedsProcessor.inc, line 363 - Contains FeedsProcessor and related classes.
Class
- FeedsProcessor
- Abstract class, defines interface for processors.
Code
protected function entityLanguage() {
if (!module_exists('locale')) {
// language_list() may return languages even if the locale module is
// disabled. See https://www.drupal.org/node/173227 why.
// When the locale module is disabled, there are no selectable languages
// in the UI, so the content should be imported in LANGUAGE_NONE.
return LANGUAGE_NONE;
}
$languages = $this
->languageOptions();
return isset($languages[$this->config['language']]) ? $this->config['language'] : LANGUAGE_NONE;
}