2010-09-27 08:45:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Symfony\Component\Translation;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony framework.
|
|
|
|
*
|
|
|
|
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TranslatorInterface.
|
|
|
|
*
|
2010-10-16 11:32:57 +01:00
|
|
|
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
2010-09-27 08:45:29 +01:00
|
|
|
*/
|
|
|
|
interface TranslatorInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Translates the given message.
|
|
|
|
*
|
|
|
|
* @param string $id The message id
|
|
|
|
* @param array $parameters An array of parameters for the message
|
|
|
|
* @param string $domain The domain for the message
|
|
|
|
* @param string $locale The locale
|
|
|
|
*
|
|
|
|
* @return string The translated string
|
|
|
|
*/
|
|
|
|
function trans($id, array $parameters = array(), $domain = null, $locale = null);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Translates the given choice message by choosing a translation according to a number.
|
|
|
|
*
|
|
|
|
* @param string $id The message id
|
|
|
|
* @param integer $number The number to use to find the indice of the message
|
|
|
|
* @param array $parameters An array of parameters for the message
|
|
|
|
* @param string $domain The domain for the message
|
|
|
|
* @param string $locale The locale
|
|
|
|
*
|
|
|
|
* @return string The translated string
|
|
|
|
*/
|
|
|
|
function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the current locale.
|
|
|
|
*
|
|
|
|
* @param string $locale The locale
|
|
|
|
*/
|
|
|
|
function setLocale($locale);
|
2010-10-06 13:18:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the current locale.
|
|
|
|
*
|
2010-10-16 11:32:57 +01:00
|
|
|
* @return string The locale
|
2010-10-06 13:18:36 +01:00
|
|
|
*/
|
|
|
|
function getLocale();
|
2010-09-27 08:45:29 +01:00
|
|
|
}
|