You are here

public static function Lingotek::isSupportedLanguage in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/Lingotek.php \Lingotek::isSupportedLanguage()
  2. 7.3 lib/Drupal/lingotek/Lingotek.php \Lingotek::isSupportedLanguage()
  3. 7.4 lib/Drupal/lingotek/Lingotek.php \Lingotek::isSupportedLanguage()
  4. 7.6 lib/Drupal/lingotek/Lingotek.php \Lingotek::isSupportedLanguage()

Returns whether the given language is supported.

Return value

Boolean value.

4 calls to Lingotek::isSupportedLanguage()
lingotek_access in ./lingotek.util.inc
Menu access callback.
lingotek_entity_upload_triggered in ./lingotek.module
lingotek_node_view in ./lingotek.module
Implements hook_node_view().
lingotek_pm in ./lingotek.page.inc
Page callback for the Lingotek local task on node detail pages.

File

lib/Drupal/lingotek/Lingotek.php, line 345
Defines Lingotek.

Class

Lingotek
A utility class for Lingotek translation.

Code

public static function isSupportedLanguage($drupal_language_code, $enabled = TRUE) {

  //($drupal_language_code != LANGUAGE_NONE)
  $supported = self::convertDrupal2Lingotek($drupal_language_code, $enabled) !== FALSE;
  if (!$supported) {
    LingotekLog::warning("Unsupported language detected: [@language]", array(
      '@language' => $drupal_language_code,
    ));
  }
  return $supported;
}