You are here

public function TMGMTTestSourcePluginController::getSourceLangCode in Translation Management Tool 7

Gets language code of the job item source.

Parameters

TMGMTJobItem $job_item: The job item.

Return value

string Language code.

Overrides TMGMTSourcePluginControllerInterface::getSourceLangCode

File

tests/tmgmt_test.plugin.source.inc, line 103
Contains the test source plugin.

Class

TMGMTTestSourcePluginController
@file Contains the test source plugin.

Code

public function getSourceLangCode(TMGMTJobItem $job_item) {
  $source_languages = variable_get('tmgmt_test_source_languages', array());
  if (isset($source_languages[$job_item->tjiid])) {
    return $source_languages[$job_item->tjiid];
  }
  return 'en';
}