public static function LingotekLocale::isSupportedLanguage in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 4.0.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.0.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.1.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.2.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.3.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.4.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.5.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.6.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.7.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
- 3.8.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::isSupportedLanguage()
Returns whether the given language is supported.
Return value
Boolean value.
File
- src/
LingotekLocale.php, line 335 - Defines LingotekLocale class.
Class
- LingotekLocale
- A utility class for Lingotek translation.
Namespace
Drupal\lingotekCode
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;
}