public function LingotekInterfaceTranslationService::getSourceLocale in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getSourceLocale()
- 3.7.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\lingotekCode
public function getSourceLocale($component) {
$source_language = 'en';
return $this->languageLocaleMapper
->getLocaleForLangcode($source_language);
}