4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Translation
;
15 * TranslatorInterface.
17 * @author Fabien Potencier <fabien@symfony.com>
21 interface TranslatorInterface
24 * Translates the given message.
26 * @param string $id The message id (may also be an object that can be cast to string)
27 * @param array $parameters An array of parameters for the message
28 * @param string $domain The domain for the message
29 * @param string $locale The locale
31 * @return string The translated string
35 public function trans($id, array $parameters = array(), $domain = null, $locale = null);
38 * Translates the given choice message by choosing a translation according to a number.
40 * @param string $id The message id (may also be an object that can be cast to string)
41 * @param integer $number The number to use to find the indice of the message
42 * @param array $parameters An array of parameters for the message
43 * @param string $domain The domain for the message
44 * @param string $locale The locale
46 * @return string The translated string
50 public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null);
53 * Sets the current locale.
55 * @param string $locale The locale
59 public function setLocale($locale);
62 * Returns the current locale.
64 * @return string The locale
68 public function getLocale();