You are here

public function Translator::setFallbackLocale in Plug 7

Sets the fallback locale(s).

@api

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

lib/Symfony/translation/Translator.php, line 178

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,
  ));
}