blob: 6eae4915d5a16b6e9941adb01cb53f8e2430ff81 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Translation;
4
5interface Translator
6{
7 /**
8 * Get the translation for a given key.
9 *
10 * @param string $key
11 * @param array $replace
12 * @param string|null $locale
13 * @return mixed
14 */
15 public function get($key, array $replace = [], $locale = null);
16
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 /**
29 * Get the default locale being used.
30 *
31 * @return string
32 */
33 public function getLocale();
34
35 /**
36 * Set the default locale.
37 *
38 * @param string $locale
39 * @return void
40 */
41 public function setLocale($locale);
42}