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