You are here

public function LingotekConfigurationService::isLanguageEnabled in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  2. 4.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  3. 3.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  4. 3.1.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  5. 3.2.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  6. 3.3.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  7. 3.4.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  8. 3.5.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  9. 3.6.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  10. 3.7.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()
  11. 3.8.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::isLanguageEnabled()

Checks if a language is enabled in the Lingotek interface.

Parameters

\Drupal\language\ConfigurableLanguageInterface $language: The language to check.

Return value

bool TRUE if the language is enabled. FALSE if it is disabled.

Overrides LingotekConfigurationServiceInterface::isLanguageEnabled

File

src/LingotekConfigurationService.php, line 282
Contains \Drupal\lingotek\LingotekConfigurationService.

Class

LingotekConfigurationService
Service for managing lingotek configuration.

Namespace

Drupal\lingotek

Code

public function isLanguageEnabled(ConfigurableLanguageInterface $language) {
  return !$language
    ->getThirdPartySetting('lingotek', 'disabled', FALSE);
}