1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ChinLeung\VerboseLocalization\Concerns; |
4
|
|
|
|
5
|
|
|
trait HasItalicVerboseMethods |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* Retrieve the translation in another locale. |
9
|
|
|
* |
10
|
|
|
* @param string $locale |
11
|
|
|
* @return mixed |
12
|
|
|
*/ |
13
|
|
|
abstract public function getTranslationIn(string $locale); |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* Function to retrieve the translation in Catalan. |
17
|
|
|
* |
18
|
|
|
* @return mixed |
19
|
|
|
*/ |
20
|
|
|
public function inCatalan() |
21
|
|
|
{ |
22
|
|
|
return $this->getTranslationIn('ca'); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Function to retrieve the translation in Corsican. |
27
|
|
|
* |
28
|
|
|
* @return mixed |
29
|
|
|
*/ |
30
|
|
|
public function inCorsican() |
31
|
|
|
{ |
32
|
|
|
return $this->getTranslationIn('co'); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Function to retrieve the translation in French. |
37
|
|
|
* |
38
|
|
|
* @return mixed |
39
|
|
|
*/ |
40
|
|
|
public function inFrench() |
41
|
|
|
{ |
42
|
|
|
return $this->getTranslationIn('fr'); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Function to retrieve the translation in Galician. |
47
|
|
|
* |
48
|
|
|
* @return mixed |
49
|
|
|
*/ |
50
|
|
|
public function inGalician() |
51
|
|
|
{ |
52
|
|
|
return $this->getTranslationIn('gl'); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Function to retrieve the translation in Italian. |
57
|
|
|
* |
58
|
|
|
* @return mixed |
59
|
|
|
*/ |
60
|
|
|
public function inItalian() |
61
|
|
|
{ |
62
|
|
|
return $this->getTranslationIn('it'); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Function to retrieve the translation in Latin. |
67
|
|
|
* |
68
|
|
|
* @return mixed |
69
|
|
|
*/ |
70
|
|
|
public function inLatin() |
71
|
|
|
{ |
72
|
|
|
return $this->getTranslationIn('la'); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Function to retrieve the translation in Portuguese. |
77
|
|
|
* |
78
|
|
|
* @return mixed |
79
|
|
|
*/ |
80
|
|
|
public function inPortuguese() : string |
81
|
|
|
{ |
82
|
|
|
return $this->getTranslationIn('pt'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Function to retrieve the translation in Romanian. |
87
|
|
|
* |
88
|
|
|
* @return mixed |
89
|
|
|
*/ |
90
|
|
|
public function inRomanian() : string |
91
|
|
|
{ |
92
|
|
|
return $this->getTranslationIn('ro'); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Function to retrieve the translation in Spanish. |
97
|
|
|
* |
98
|
|
|
* @return mixed |
99
|
|
|
*/ |
100
|
|
|
public function inSpanish() : string |
101
|
|
|
{ |
102
|
|
|
return $this->getTranslationIn('es'); |
103
|
|
|
} |
104
|
|
|
} |
105
|
|
|
|