You are here

function lingotek_get_source_language in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_get_source_language()
  2. 7.3 lingotek.util.inc \lingotek_get_source_language()
  3. 7.4 lingotek.util.inc \lingotek_get_source_language()
  4. 7.5 lingotek.util.inc \lingotek_get_source_language()
  5. 7.6 lingotek.util.inc \lingotek_get_source_language()

Gets the Lingotek Source Language ( Drupal variable: lingotek_source_language). Returns a language code (ie: en / es / de) Uses the Drupal default language as a fallback.

7 calls to lingotek_get_source_language()
lingotek_field_language_data_cleanup_batch_create in ./lingotek.batch.inc
Field Language Data Cleanup Utility
lingotek_form_node_form_alter in ./lingotek.module
Implements hook_form_BASE_FORM_ID_alter().
lingotek_get_node_count in ./lingotek.dashboard.inc
Counts all the nodes of a specific language.
lingotek_get_node_id_from_document_id in ./lingotek.sync.inc
Finds the Node ID when given a Document ID. (Deprecate) Returns FALSE if not found.
lingotek_get_source_language_json in ./lingotek.dashboard.inc
Outputs the language code with page count in json format. Supplied to the dashboard. Output Format: {'code':'en','docs':'500'}

... See full list

File

./lingotek.util.inc, line 532
Utility functions.

Code

function lingotek_get_source_language() {
  $source_language = variable_get('lingotek_source_language', NULL);
  if (empty($source_language)) {
    $drupal_default_language = language_default();
    $source_language = $drupal_default_language->language;
  }
  return $source_language;
}