-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathConfig.php
321 lines (315 loc) · 10.8 KB
/
Config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Locale;
/**
* Allowed locale and currency configuration.
*/
class Config implements \Magento\Framework\Locale\ConfigInterface
{
/**
* List of allowed locales
*
* @var array
*/
protected $_allowedLocales = [
'af_ZA', /*Afrikaans (South Africa)*/
'ar_DZ', /*Arabic (Algeria)*/
'ar_EG', /*Arabic (Egypt)*/
'ar_KW', /*Arabic (Kuwait)*/
'ar_MA', /*Arabic (Morocco)*/
'ar_SA', /*Arabic (Saudi Arabia)*/
'az_Latn_AZ', /*Azerbaijani (Azerbaijan)*/
'be_BY', /*Belarusian (Belarus)*/
'bg_BG', /*Bulgarian (Bulgaria)*/
'bn_BD', /*Bengali (Bangladesh)*/
'bs_Latn_BA', /*Bosnian (Bosnia)*/
'ca_ES', /*Catalan (Catalonia)*/
'cs_CZ', /*Czech (Czech Republic)*/
'cy_GB', /*Welsh (United Kingdom)*/
'da_DK', /*Danish (Denmark)*/
'de_AT', /*German (Austria)*/
'de_CH', /*German (Switzerland)*/
'de_DE', /*German (Germany)*/
'de_LU', /*German (Luxembourg)*/
'el_GR', /*Greek (Greece)*/
'en_AU', /*English (Australian)*/
'en_CA', /*English (Canadian)*/
'en_GB', /*English (United Kingdom)*/
'en_NZ', /*English (New Zealand)*/
'en_US', /*English (United States)*/
'es_AR', /*Spanish (Argentina)*/
'es_CO', /*Spanish (Colombia)*/
'es_PA', /*Spanish (Panama)*/
'gl_ES', /*Galician (Galician)*/
'es_CR', /*Spanish (Costa Rica)*/
'es_ES', /*Spanish (Spain)*/
'es_MX', /*Spanish (Mexico)*/
'eu_ES', /*Basque (Basque)*/
'es_PE', /*Spanish (Peru)*/
'et_EE', /*Estonian (Estonia)*/
'fa_IR', /*Persian (Iran)*/
'fi_FI', /*Finnish (Finland)*/
'fil_PH', /*Filipino (Philippines)*/
'fr_BE', /*French (Belgium)*/
'fr_CA', /*French (Canada)*/
'fr_CH', /*French (Switzerland)*/
'fr_FR', /*French (France)*/
'fr_LU', /*French (Luxembourg)*/
'gu_IN', /*Gujarati (India)*/
'he_IL', /*Hebrew (Israel)*/
'hi_IN', /*Hindi (India)*/
'hr_HR', /*Croatian (Croatia)*/
'hu_HU', /*Hungarian (Hungary)*/
'id_ID', /*Indonesian (Indonesia)*/
'is_IS', /*Icelandic (Iceland)*/
'it_CH', /*Italian (Switzerland)*/
'it_IT', /*Italian (Italy)*/
'ja_JP', /*Japanese (Japan)*/
'ka_GE', /*Georgian (Georgia)*/
'km_KH', /*Khmer (Cambodia)*/
'ko_KR', /*Korean (South Korea)*/
'lo_LA', /*Lao (Laos)*/
'lt_LT', /*Lithuanian (Lithuania)*/
'lv_LV', /*Latvian (Latvia)*/
'mk_MK', /*Macedonian (Macedonia)*/
'mn_Cyrl_MN', /*Mongolian (Mongolia)*/
'ms_MY', /*Malaysian (Malaysia)*/
'ms_Latn_MY', /*Malaysian (Malaysia)*/
'nl_BE', /*Dutch (Belgium)*/
'nl_NL', /*Dutch (Netherlands)*/
'nb_NO', /*Norwegian Bokmål (Norway)*/
'nn_NO', /*Norwegian Nynorsk (Norway)*/
'pl_PL', /*Polish (Poland)*/
'pt_BR', /*Portuguese (Brazil)*/
'pt_PT', /*Portuguese (Portugal)*/
'ro_RO', /*Romanian (Romania)*/
'ru_RU', /*Russian (Russia)*/
'sk_SK', /*Slovak (Slovakia)*/
'sl_SI', /*Slovenian (Slovenia)*/
'sq_AL', /*Albanian (Albania)*/
'sr_Cyrl_RS', /*Serbian (Cyrillic, Serbia)*/
'sr_Latn_RS', /*Serbian (Latin, Serbia)*/
'sv_SE', /*Swedish (Sweden)*/
'sv_FI', /*Swedish (Finland)*/
'sw_KE', /*Swahili (Kenya)*/
'th_TH', /*Thai (Thailand)*/
'tr_TR', /*Turkish (Turkey)*/
'uk_UA', /*Ukrainian (Ukraine)*/
'vi_VN', /*Vietnamese (Vietnam)*/
'zh_Hans_CN', /*Chinese (China)*/
'zh_Hant_HK', /*Chinese (Hong Kong SAR)*/
'zh_Hant_TW', /*Chinese (Taiwan)*/
'es_CL', /*Spanich (Chile)*/
'lo_LA', /*Laotian*/
'es_VE', /*Spanish (Venezuela)*/
'en_IE', /*English (Ireland)*/
'es_BO', /*Spanish (Bolivia)*/
'es_US', /*Spanish (United States)*/
];
/**
* List of allowed currencies
*
* @var array
*/
protected $_allowedCurrencies = [
'AFN', /*Afghani*/
'ALL', /*Albanian Lek*/
'AZN', /*Azerbaijanian Manat*/
'DZD', /*Algerian Dinar*/
'AOA', /*Angolan Kwanza*/
'ARS', /*Argentine Peso*/
'AMD', /*Armenian Dram*/
'AWG', /*Aruban Florin*/
'AUD', /*Australian Dollar*/
'BSD', /*Bahamian Dollar*/
'BHD', /*Bahraini Dinar*/
'BDT', /*Bangladesh Taka*/
'BBD', /*Barbados Dollar*/
'BYN', /*Belarussian Ruble*/
'BZD', /*Belize Dollar*/
'BMD', /*Bermudan Dollar*/
'BTN', /*Bhutan Ngultrum*/
'BOB', /*Boliviano*/
'BAM', /*Bosnia-Herzegovina Convertible Mark*/
'BWP', /*Botswanan Pula*/
'BRL', /*Brazilian Real*/
'GBP', /*British Pound Sterling*/
'BND', /*Brunei Dollar*/
'BGN', /*Bulgarian New Lev*/
'BUK', /*Burmese Kyat*/
'BIF', /*Burundi Franc*/
'KHR', /*Cambodian Riel*/
'CAD', /*Canadian Dollar*/
'CVE', /*Cape Verde Escudo*/
'CZK', /*Czech Republic Koruna*/
'KYD', /*Cayman Islands Dollar*/
'GQE', /*Central African CFA Franc*/
'CLP', /*Chilean Peso*/
'CNY', /*Chinese Yuan Renminbi*/
'COP', /*Colombian Peso*/
'KMF', /*Comoro Franc*/
'CDF', /*Congolese Franc Congolais*/
'CRC', /*Costa Rican Colon*/
'HRK', /*Croatian Kuna*/
'CUP', /*Cuban Peso*/
'DKK', /*Danish Krone*/
'DJF', /*Djibouti Franc*/
'DOP', /*Dominican Peso*/
'XCD', /*East Caribbean Dollar*/
'EGP', /*Egyptian Pound*/
'SVC', /*El Salvador Colon*/
'ERN', /*Eritrean Nakfa*/
'EEK', /*Estonian Kroon*/
'ETB', /*Ethiopian Birr*/
'EUR', /*Euro*/
'FKP', /*Falkland Islands Pound*/
'FJD', /*Fiji Dollar*/
'GMD', /*Gambia Dalasi*/
'GEK', /*Georgian Kupon Larit*/
'GEL', /*Georgian Lari*/
'GHS', /*Ghana Cedi*/
'GIP', /*Gibraltar Pound*/
'GTQ', /*Guatemala Quetzal*/
'GNF', /*Guinea Franc*/
'GYD', /*Guyana Dollar*/
'HTG', /*Haitian Gourde*/
'HNL', /*Honduras Lempira*/
'HKD', /*Hong Kong Dollar*/
'HUF', /*Hungarian Forint*/
'ISK', /*Icelandic Krona*/
'INR', /*Indian Rupee*/
'IDR', /*Indonesian Rupiah*/
'IRR', /*Iranian Rial*/
'IQD', /*Iraqi Dinar*/
'ILS', /*Israeli New Sheqel*/
'JMD', /*Jamaican Dollar*/
'JPY', /*Japanese Yen*/
'JOD', /*Jordanian Dinar*/
'KZT', /*Kazakhstan Tenge*/
'KES', /*Kenyan Shilling*/
'KWD', /*Kuwaiti Dinar*/
'KGS', /*Kyrgystan Som*/
'LAK', /*Laotian Kip*/
'LVL', /*Latvian Lats*/
'LBP', /*Lebanese Pound*/
'LSL', /*Lesotho Loti*/
'LRD', /*Liberian Dollar*/
'LYD', /*Libyan Dinar*/
'LTL', /*Lithuanian Lita*/
'MOP', /*Macao Pataca*/
'MKD', /*Macedonian Denar*/
'MGA', /*Malagasy Ariary*/
'MWK', /*Malawi Kwacha*/
'MYR', /*Malaysian Ringgit*/
'MVR', /*Maldive Islands Rufiyaa*/
'LSM', /*Maloti*/
'MRO', /*Mauritania Ouguiya*/
'MUR', /*Mauritius Rupee*/
'MXN', /*Mexican Peso*/
'MDL', /*Moldovan Leu*/
'MNT', /*Mongolian*/
'MAD', /*Moroccan Dirham*/
'MZN', /*Mozambique Metical*/
'MMK', /*Myanmar Kyat*/
'NAD', /*Namibia Dollar*/
'NPR', /*Nepalese Rupee*/
'ANG', /*Netherlands Antillan Guilder*/
'YTL', /*New Turkish Lira*/
'NZD', /*New Zealand Dollar*/
'NIC', /*Nicaraguan Cordoba*/
'NGN', /*Nigerian Naira*/
'KPW', /*North Korean Won*/
'NOK', /*Norwegian Krone*/
'OMR', /*Oman Rial*/
'PKR', /*Pakistan Rupee*/
'PAB', /*Panamanian Balboa*/
'PGK', /*Papua New Guinea Kina*/
'PYG', /*Paraguay Guarani*/
'PEN', /*Peruvian Nuevo Sol*/
'PHP', /*Philippine Peso*/
'PLN', /*Polish Zloty*/
'QAR', /*Qatari Rial*/
'RHD', /*Rhodesian Dollar*/
'RON', /*Romanian Leu*/
'RUB', /*Russian Ruble*/
'RWF', /*Rwandan Franc*/
'SHP', /*Saint Helena Pound*/
'STD', /*Sao Tome Dobra*/
'SAR', /*Saudi Riyal*/
'RSD', /*Serbian Dinar*/
'SCR', /*Seychelles Rupee*/
'SLL', /*Sierra Leone Leone*/
'SGD', /*Singapore Dollar*/
'SKK', /*Slovak Koruna*/
'SBD', /*Solomon Islands Dollar*/
'SOS', /*Somali Shilling*/
'ZAR', /*South African Rand*/
'KRW', /*South Korean Won*/
'LKR', /*Sri Lanka Rupee*/
'SDG', /*Sudanese Pound*/
'SRD', /*Surinam Dollar*/
'SZL', /*Swaziland Lilangeni*/
'SEK', /*Swedish Krona*/
'CHF', /*Swiss Franc*/
'SYP', /*Syrian Pound*/
'TWD', /*Taiwan New Dollar*/
'TJS', /*Tajikistan Somoni*/
'TZS', /*Tanzanian Shilling*/
'THB', /*Thai Baht*/
'TOP', /*Tonga Pa?anga*/
'TTD', /*Trinidad and Tobago Dollar*/
'TND', /*Tunisian Dinar*/
'TMM', /*Turkmenistan Manat*/
'USD', /*US Dollar*/
'UGX', /*Ugandan Shilling*/
'UAH', /*Ukrainian Hryvnia*/
'AED', /*United Arab Emirates Dirham*/
'UYU', /*Uruguay Peso Uruguayo*/
'UZS', /*Uzbekistan Sum*/
'VUV', /*Vanuatu Vatu*/
'VEB', /*Venezuelan Bolivar*/
'VEF', /*Venezuelan bolívar fuerte*/
'VND', /*Vietnamese Dong*/
'CHE', /*WIR Euro*/
'CHW', /*WIR Franc*/
'XOF', /*West African CFA franc*/
'WST', /*Western Samoa Tala*/
'YER', /*Yemeni Rial*/
'ZMK', /*Zambian Kwacha*/
'ZWD', /*Zimbabwe Dollar*/
'TRY', /*Turkish Lira*/
'AZM', /*Azerbaijani Manat (1993-2006)*/
'ROL', /*Old Romanian Leu*/
'TRL', /*Old Turkish Lira*/
'XPF', /*CFP Franc*/
];
/**
* @param array $data
*/
public function __construct(array $data = [])
{
if (isset($data['allowedLocales']) && is_array($data['allowedLocales'])) {
$this->_allowedLocales = array_merge($this->_allowedLocales, $data['allowedLocales']);
}
if (isset($data['allowedCurrencies']) && is_array($data['allowedCurrencies'])) {
$this->_allowedCurrencies = array_merge($this->_allowedCurrencies, $data['allowedCurrencies']);
}
}
/**
* @inheritdoc
*/
public function getAllowedLocales()
{
return $this->_allowedLocales;
}
/**
* @inheritdoc
*/
public function getAllowedCurrencies()
{
return $this->_allowedCurrencies;
}
}