DrupalTranslator
class DrupalTranslator implements TranslatorInterface (View source)
Translates strings using Drupal's translation system.
This class is used by the Symfony validator to translate violation messages.
Properties
| protected string | $locale | The locale used for translating. |
Methods
trans($id, array $parameters = [], $domain = NULL, $locale = NULL)
{@inheritdoc}
transChoice($id, $number, array $parameters = [], $domain = NULL, $locale = NULL)
{@inheritdoc}
setLocale($locale)
{@inheritdoc}
getLocale()
{@inheritdoc}
processParameters(array $parameters)
Processes the parameters array for use with TranslatableMarkup.
getOptions($domain = NULL, $locale = NULL)
Returns options suitable for use with TranslatableMarkup.
Details
trans($id, array $parameters = [], $domain = NULL, $locale = NULL)
{@inheritdoc}
transChoice($id, $number, array $parameters = [], $domain = NULL, $locale = NULL)
{@inheritdoc}
setLocale($locale)
{@inheritdoc}
getLocale()
{@inheritdoc}
protected
processParameters(array $parameters)
Processes the parameters array for use with TranslatableMarkup.
protected
getOptions($domain = NULL, $locale = NULL)
Returns options suitable for use with TranslatableMarkup.