public function LingotekInterfaceTranslationService::getTargetStatus in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getTargetStatus()
- 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
7 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::getSourceStatus in src/
LingotekInterfaceTranslationService.php - Gets the source status of the given component.
- LingotekInterfaceTranslationService::markTranslationsAsDirty in src/
LingotekInterfaceTranslationService.php - Marks the translation status as dirty if they exist.
File
- src/
LingotekInterfaceTranslationService.php, line 282
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
public function getTargetStatus($component, $langcode) {
$status = Lingotek::STATUS_UNTRACKED;
$statuses = $this
->getTargetStatuses($component);
if (isset($statuses[$langcode])) {
$status = $statuses[$langcode];
}
return $status;
}