IdentityTranslator
class IdentityTranslator implements TranslatorInterface
IdentityTranslator does not translate anything.
Methods
setLocale(string $locale)
Sets the current locale.
string
getLocale()
Returns the current locale.
string
trans(string $id, array $parameters = array(), string|null $domain = null, string|null $locale = null)
Translates the given message.
string
transChoice(string $id, int $number, array $parameters = array(), string|null $domain = null, string|null $locale = null)
Translates the given choice message by choosing a translation according to a number.
Details
at line line 29
__construct(MessageSelector $selector = null)
Constructor.
at line line 37
setLocale(string $locale)
Sets the current locale.
at line line 45
string
getLocale()
Returns the current locale.
at line line 53
string
trans(string $id, array $parameters = array(), string|null $domain = null, string|null $locale = null)
Translates the given message.
at line line 61
string
transChoice(string $id, int $number, array $parameters = array(), string|null $domain = null, string|null $locale = null)
Translates the given choice message by choosing a translation according to a number.