| 1 | <?php |
||
| 5 | trait WithLocales |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The current locale. |
||
| 9 | * |
||
| 10 | * @var string $locale |
||
| 11 | */ |
||
| 12 | protected $locale; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The current locale. |
||
| 16 | * |
||
| 17 | * @var string $locale |
||
| 18 | */ |
||
| 19 | protected $fallbackLocale; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get the current locale. |
||
| 23 | * |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | 105 | public function getLocale() |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Set the current locale. |
||
| 33 | * |
||
| 34 | * @param $locale |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | 105 | public function setLocale($locale) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Get the fallback locale. |
||
| 46 | * |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | 93 | public function getFallbackLocale() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Set the fallback locale. |
||
| 56 | * |
||
| 57 | * @param $locale |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | 105 | public function setFallbackLocale($locale) |
|
| 66 | } |
||
| 67 |