1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ChinLeung\VerboseLocalization\Concerns; |
4
|
|
|
|
5
|
|
|
trait HasGermanicVerboseMethods |
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 Afrikaans. |
17
|
|
|
* |
18
|
|
|
* @return mixed |
19
|
|
|
*/ |
20
|
|
|
public function inAfrikaans() |
21
|
|
|
{ |
22
|
|
|
return $this->getTranslationIn('af'); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Function to retrieve the translation in Danish. |
27
|
|
|
* |
28
|
|
|
* @return mixed |
29
|
|
|
*/ |
30
|
|
|
public function inDanish() |
31
|
|
|
{ |
32
|
|
|
return $this->getTranslationIn('da'); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Function to retrieve the translation in Dutch. |
37
|
|
|
* |
38
|
|
|
* @return mixed |
39
|
|
|
*/ |
40
|
|
|
public function inDutch() |
41
|
|
|
{ |
42
|
|
|
return $this->getTranslationIn('nl'); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Function to retrieve the translation in English. |
47
|
|
|
* |
48
|
|
|
* @return mixed |
49
|
|
|
*/ |
50
|
|
|
public function inEnglish() |
51
|
|
|
{ |
52
|
|
|
return $this->getTranslationIn('en'); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Function to retrieve the translation in Frisian. |
57
|
|
|
* |
58
|
|
|
* @returnsmixed |
59
|
|
|
*/ |
60
|
|
|
public function inFrisian() |
61
|
|
|
{ |
62
|
|
|
return $this->getTranslationIn('fy'); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Function to retrieve the translation in German. |
67
|
|
|
* |
68
|
|
|
* @returnsmixed |
69
|
|
|
*/ |
70
|
|
|
public function inGerman() |
71
|
|
|
{ |
72
|
|
|
return $this->getTranslationIn('de'); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Function to retrieve the translation in Icelandic. |
77
|
|
|
* |
78
|
|
|
* @returnsmixed |
79
|
|
|
*/ |
80
|
|
|
public function inIcelandic() |
81
|
|
|
{ |
82
|
|
|
return $this->getTranslationIn('is'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Function to retrieve the translation in Luxembourgish. |
87
|
|
|
* |
88
|
|
|
* @returnsmixed |
89
|
|
|
*/ |
90
|
|
|
public function inLuxembourgish() |
91
|
|
|
{ |
92
|
|
|
return $this->getTranslationIn('lb'); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Function to retrieve the translation in Norwegian. |
97
|
|
|
* |
98
|
|
|
* @returnsmixed |
99
|
|
|
*/ |
100
|
|
|
public function inNorwegian() : string |
101
|
|
|
{ |
102
|
|
|
return $this->getTranslationIn('no'); |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Function to retrieve the translation in Yiddish. |
107
|
|
|
* |
108
|
|
|
* @returnsmixed |
109
|
|
|
*/ |
110
|
|
|
public function inYiddish() : string |
111
|
|
|
{ |
112
|
|
|
return $this->getTranslationIn('yi'); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* Function to retrieve the translation in Swedish. |
117
|
|
|
* |
118
|
|
|
* @returnsmixed |
119
|
|
|
*/ |
120
|
|
|
public function inSwedish() : string |
121
|
|
|
{ |
122
|
|
|
return $this->getTranslationIn('sv'); |
123
|
|
|
} |
124
|
|
|
} |
125
|
|
|
|