1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ChinLeung\VerboseLocalization\Concerns; |
4
|
|
|
|
5
|
|
|
trait HasAustronesianVerboseMethods |
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 name in Cebuano. |
17
|
|
|
* |
18
|
|
|
* @return mixed |
19
|
|
|
*/ |
20
|
|
|
public function inCebuano() : string |
21
|
|
|
{ |
22
|
|
|
return $this->getTranslationIn('ceb'); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Function to retrieve the name in Filipino. |
27
|
|
|
* |
28
|
|
|
* @return mixed |
29
|
|
|
*/ |
30
|
|
|
public function inFilipino() : string |
31
|
|
|
{ |
32
|
|
|
return $this->getTranslationIn('tl'); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Function to retrieve the name in Hawaiian. |
37
|
|
|
* |
38
|
|
|
* @return mixed |
39
|
|
|
*/ |
40
|
|
|
public function inHawaiian() : string |
41
|
|
|
{ |
42
|
|
|
return $this->getTranslationIn('haw'); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Function to retrieve the translation in Indonesian. |
47
|
|
|
* |
48
|
|
|
* @return mixed |
49
|
|
|
*/ |
50
|
|
|
public function inIndonesian() |
51
|
|
|
{ |
52
|
|
|
return $this->getTranslationIn('id'); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Function to retrieve the name in Javanese. |
57
|
|
|
* |
58
|
|
|
* @return mixed |
59
|
|
|
*/ |
60
|
|
|
public function inJavanese() : string |
61
|
|
|
{ |
62
|
|
|
return $this->getTranslationIn('jw'); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Function to retrieve the name in Khmer. |
67
|
|
|
* |
68
|
|
|
* @return mixed |
69
|
|
|
*/ |
70
|
|
|
public function inKhmer() : string |
71
|
|
|
{ |
72
|
|
|
return $this->getTranslationIn('km'); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Function to retrieve the name in Malagasy. |
77
|
|
|
* |
78
|
|
|
* @return mixed |
79
|
|
|
*/ |
80
|
|
|
public function inMalagasy() : string |
81
|
|
|
{ |
82
|
|
|
return $this->getTranslationIn('mg'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Function to retrieve the name in Malay. |
87
|
|
|
* |
88
|
|
|
* @return mixed |
89
|
|
|
*/ |
90
|
|
|
public function inMalay() : string |
91
|
|
|
{ |
92
|
|
|
return $this->getTranslationIn('ms'); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Function to retrieve the name in Maori. |
97
|
|
|
* |
98
|
|
|
* @return mixed |
99
|
|
|
*/ |
100
|
|
|
public function inMaori() : string |
101
|
|
|
{ |
102
|
|
|
return $this->getTranslationIn('mi'); |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Function to retrieve the name in Samoan. |
107
|
|
|
* |
108
|
|
|
* @return mixed |
109
|
|
|
*/ |
110
|
|
|
public function inSamoan() : string |
111
|
|
|
{ |
112
|
|
|
return $this->getTranslationIn('sm'); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* Function to retrieve the name in Sundanese. |
117
|
|
|
* |
118
|
|
|
* @return mixed |
119
|
|
|
*/ |
120
|
|
|
public function inSundanese() : string |
121
|
|
|
{ |
122
|
|
|
return $this->getTranslationIn('su'); |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* Function to retrieve the name in Vietnamese. |
127
|
|
|
* |
128
|
|
|
* @return mixed |
129
|
|
|
*/ |
130
|
|
|
public function inVietnamese() : string |
131
|
|
|
{ |
132
|
|
|
return $this->getTranslationIn('vi'); |
133
|
|
|
} |
134
|
|
|
} |
135
|
|
|
|