You are here

public function LingotekInterfaceTranslationService::getTargetStatus in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  2. 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  3. 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  4. 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  5. 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  6. 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
  7. 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()

Gets the translation status of a given component translation for a locale.

Parameters

string $component: The component which status we want to get.

string $locale: Lingotek translation language which we want to get.

Return value

int The status of the target translation (see Lingotek class constants)

Overrides LingotekInterfaceTranslationServiceInterface::getTargetStatus

8 calls to LingotekInterfaceTranslationService::getTargetStatus()
LingotekInterfaceTranslationService::addTarget in src/LingotekInterfaceTranslationService.php
Request a translation for a given component in the given locale.
LingotekInterfaceTranslationService::checkTargetStatus in src/LingotekInterfaceTranslationService.php
Gets the current status of the target translation.
LingotekInterfaceTranslationService::checkTargetStatuses in src/LingotekInterfaceTranslationService.php
Gets the current status of all the target translations.
LingotekInterfaceTranslationService::downloadDocument in src/LingotekInterfaceTranslationService.php
Downloads a document from the Lingotek service for a given locale.
LingotekInterfaceTranslationService::getSourceStatus in src/LingotekInterfaceTranslationService.php
Gets the source status of the given component.

... See full list

File

src/LingotekInterfaceTranslationService.php, line 319

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function getTargetStatus($component, $langcode) {
  $status = Lingotek::STATUS_UNTRACKED;
  $statuses = $this
    ->getTargetStatuses($component);
  if (isset($statuses[$langcode])) {
    $status = $statuses[$langcode];
  }
  return $status;
}