You are here

public function CurrencyImporter::importTranslations in Price 8

Same name and namespace in other branches
  1. 3.x src/CurrencyImporter.php \Drupal\price\CurrencyImporter::importTranslations()
  2. 2.0.x src/CurrencyImporter.php \Drupal\price\CurrencyImporter::importTranslations()
  3. 2.x src/CurrencyImporter.php \Drupal\price\CurrencyImporter::importTranslations()
  4. 3.0.x src/CurrencyImporter.php \Drupal\price\CurrencyImporter::importTranslations()

Imports translations for the given language codes.

Parameters

array $langcodes: Array of language codes to import translations for.

Overrides CurrencyImporterInterface::importTranslations

File

src/CurrencyImporter.php, line 123

Class

CurrencyImporter
Default implementation of the currency importer.

Namespace

Drupal\price

Code

public function importTranslations(array $langcodes) {
  foreach ($this->storage
    ->loadMultiple() as $currency) {
    $this
      ->importEntityTranslations($currency, $langcodes);
  }
}