You are here

public function LingotekConfigTranslationService::getConfigSourceLocale in Lingotek Translation 8

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

Gets the translation source locale of a given entity.

Parameters

ConfigNamesMapper $mapper: The entity which we want to get the source locale.

Return value

string The locale as expected by the Lingotek service.

Overrides LingotekConfigTranslationServiceInterface::getConfigSourceLocale

1 call to LingotekConfigTranslationService::getConfigSourceLocale()
LingotekConfigTranslationService::uploadConfig in src/LingotekConfigTranslationService.php
Uploads a document to the Lingotek service.

File

src/LingotekConfigTranslationService.php, line 642
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getConfigSourceLocale(ConfigNamesMapper $mapper) {
  $source_langcode = $mapper
    ->getLangcode();
  return $this->languageLocaleMapper
    ->getLocaleForLangcode($source_langcode);
}