You are here

function lingotek_get_source_language in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_get_source_language()
  2. 7.2 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.

6 calls to lingotek_get_source_language()
LingotekApi::addContentDocument in lib/Drupal/lingotek/LingotekApi.php
Add a document to the Lingotek platform.
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_source_language_json in ./lingotek.dashboard.inc
Outputs the language code with page count in json format. Supplied to the dashboard. Output Format (example): {'code':'en_US','docs':'500'}
lingotek_notifications in ./lingotek.sync.inc
Registers the site translation notfication callback.

... See full list

File

./lingotek.util.inc, line 509
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;
}