TranslatorInterface.php 707 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Symfony\Components\I18N;
  3. /**
  4. * A translator used for translating text.
  5. *
  6. * @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
  7. */
  8. interface TranslatorInterface
  9. {
  10. /**
  11. * Translates a given text string.
  12. *
  13. * @param string $text The text to translate
  14. * @param array $parameters The parameters to inject into the text
  15. * @param string $locale The locale of the translated text. If null,
  16. * the preconfigured locale of the translator
  17. * or the system's default culture is used.
  18. */
  19. public function translate($text, array $parameters = array(), $locale = null);
  20. }