You are here

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

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

Gets the translation source locale of a given component.

Parameters

string $component: The component which we want to get the source locale.

Return value

string The locale as expected by the Lingotek service.

Overrides LingotekInterfaceTranslationServiceInterface::getSourceLocale

2 calls to LingotekInterfaceTranslationService::getSourceLocale()
LingotekInterfaceTranslationService::updateDocument in src/LingotekInterfaceTranslationService.php
Resends a document to the translation service.
LingotekInterfaceTranslationService::uploadDocument in src/LingotekInterfaceTranslationService.php
Uploads a document to the Lingotek service.

File

src/LingotekInterfaceTranslationService.php, line 428

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function getSourceLocale($component) {
  $source_language = 'en';
  return $this->languageLocaleMapper
    ->getLocaleForLangcode($source_language);
}