1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ChinLeung\VerboseLocalization\Concerns; |
4
|
|
|
|
5
|
|
|
trait HasNigerCongoVerboseMethods |
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 Chewa. |
17
|
|
|
* |
18
|
|
|
* @return mixed |
19
|
|
|
*/ |
20
|
|
|
public function inChewa() |
21
|
|
|
{ |
22
|
|
|
return $this->getTranslationIn('ny'); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Function to retrieve the translation in Chichewa. |
27
|
|
|
* |
28
|
|
|
* @return mixed |
29
|
|
|
*/ |
30
|
|
|
public function inChichewa() |
31
|
|
|
{ |
32
|
|
|
return $this->inChewa(); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Function to retrieve the translation in Igbo. |
37
|
|
|
* |
38
|
|
|
* @return mixed |
39
|
|
|
*/ |
40
|
|
|
public function inIgbo() |
41
|
|
|
{ |
42
|
|
|
return $this->getTranslationIn('ig'); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Function to retrieve the translation in Sesotho. |
47
|
|
|
* |
48
|
|
|
* @return mixed |
49
|
|
|
*/ |
50
|
|
|
public function inSesotho() |
51
|
|
|
{ |
52
|
|
|
return $this->getTranslationIn('st'); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Function to retrieve the translation in Shona. |
57
|
|
|
* |
58
|
|
|
* @return mixed |
59
|
|
|
*/ |
60
|
|
|
public function inShona() |
61
|
|
|
{ |
62
|
|
|
return $this->getTranslationIn('sn'); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Function to retrieve the translation in Swahili. |
67
|
|
|
* |
68
|
|
|
* @return mixed |
69
|
|
|
*/ |
70
|
|
|
public function inSwahili() |
71
|
|
|
{ |
72
|
|
|
return $this->getTranslationIn('sw'); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Function to retrieve the translation in Xhosa. |
77
|
|
|
* |
78
|
|
|
* @return mixed |
79
|
|
|
*/ |
80
|
|
|
public function inXhosa() |
81
|
|
|
{ |
82
|
|
|
return $this->getTranslationIn('xh'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Function to retrieve the translation in Yoruba. |
87
|
|
|
* |
88
|
|
|
* @return mixed |
89
|
|
|
*/ |
90
|
|
|
public function inYoruba() |
91
|
|
|
{ |
92
|
|
|
return $this->getTranslationIn('yo'); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Function to retrieve the translation in Zulu. |
97
|
|
|
* |
98
|
|
|
* @return mixed |
99
|
|
|
*/ |
100
|
|
|
public function inZulu() |
101
|
|
|
{ |
102
|
|
|
return $this->getTranslationIn('zu'); |
103
|
|
|
} |
104
|
|
|
} |
105
|
|
|
|