53 lines
1.5 KiB
PHP
53 lines
1.5 KiB
PHP
|
<?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.
|
||
|
*
|
||
|
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
||
|
*/
|
||
|
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);
|
||
|
}
|