function LocaleSource::loadSource

Loads a single translation source containing current translation status.

Parameters

string $project_name: The project name.

string $langcode: The language code.

Return value

\Drupal\locale\LocaleTranslationSource The source object.

File

core/modules/locale/src/LocaleSource.php, line 84

Class

LocaleSource
Provides the locale source services.

Namespace

Drupal\locale

Code

public function loadSource(string $project_name, string $langcode) : LocaleTranslationSource {
  return $this->loadSources([
    $project_name,
  ], [
    $langcode,
  ])[$project_name][$langcode];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.