Translator.php 916B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Illuminate\Contracts\Translation;
  3. interface Translator
  4. {
  5. /**
  6. * Get the translation for a given key.
  7. *
  8. * @param string $key
  9. * @param array $replace
  10. * @param string $locale
  11. * @return mixed
  12. */
  13. public function trans($key, array $replace = [], $locale = null);
  14. /**
  15. * Get a translation according to an integer value.
  16. *
  17. * @param string $key
  18. * @param int|array|\Countable $number
  19. * @param array $replace
  20. * @param string $locale
  21. * @return string
  22. */
  23. public function transChoice($key, $number, array $replace = [], $locale = null);
  24. /**
  25. * Get the default locale being used.
  26. *
  27. * @return string
  28. */
  29. public function getLocale();
  30. /**
  31. * Set the default locale.
  32. *
  33. * @param string $locale
  34. * @return void
  35. */
  36. public function setLocale($locale);
  37. }