You are here

public function Translator::setFallbackLocale in Zircon Profile 8

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

Sets the fallback locale(s).

Parameters

string|array $locales The fallback locale(s):

Throws

\InvalidArgumentException If a locale contains invalid characters

Deprecated

since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead.

File

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

Class

Translator
Translator.

Namespace

Symfony\Component\Translation

Code

public function setFallbackLocale($locales) {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.3 and will be removed in 3.0. Use the setFallbackLocales() method instead.', E_USER_DEPRECATED);
  $this
    ->setFallbackLocales(is_array($locales) ? $locales : array(
    $locales,
  ));
}