You are here

public function Translator::setFallbackLocales in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Translator.php \Symfony\Component\Translation\Translator::setFallbackLocales()

Sets the fallback locales.

Parameters

array $locales The fallback locales:

Throws

\InvalidArgumentException If a locale contains invalid characters

1 call to Translator::setFallbackLocales()
Translator::setFallbackLocale in vendor/symfony/translation/Translator.php
Sets the fallback locale(s).

File

vendor/symfony/translation/Translator.php, line 178

Class

Translator
Translator.

Namespace

Symfony\Component\Translation

Code

public function setFallbackLocales(array $locales) {

  // needed as the fallback locales are linked to the already loaded catalogues
  $this->catalogues = array();
  foreach ($locales as $locale) {
    $this
      ->assertValidLocale($locale);
  }
  $this->fallbackLocales = $locales;
}