core#2386 - metadata-driven chain-select fields
[civicrm-core.git] / settings / Localization.setting.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
6b7eb9df 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
6b7eb9df
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 */
17/*
18 * Settings metadata file
19 */
20
dfe1f88a
CW
21return [
22 'customTranslateFunction' => [
8a61528e 23 'add' => '4.7',
8a61528e
TO
24 'help_text' => NULL,
25 'is_domain' => 1,
26 'is_contact' => 0,
27 'group_name' => 'Localization Preferences',
28 'group' => 'localization',
29 'name' => 'customTranslateFunction',
30 'type' => 'String',
31 'quick_form_type' => 'Element',
32 'html_type' => 'text',
dfe1f88a 33 'html_attributes' => [
8a61528e
TO
34 'size' => '30',
35 'maxlength' => '100',
dfe1f88a 36 ],
8a61528e 37 'default' => NULL,
4638f0f6 38 'title' => ts('Custom Translate Function'),
dfe1f88a
CW
39 ],
40 'monetaryThousandSeparator' => [
6a488035
TO
41 'group_name' => 'Localization Preferences',
42 'group' => 'localization',
43 'name' => 'monetaryThousandSeparator',
6a488035
TO
44 'type' => 'String',
45 'quick_form_type' => 'Element',
46 'html_type' => 'text',
dfe1f88a 47 'html_attributes' => [
6a488035 48 'size' => 2,
dfe1f88a 49 ],
6a488035
TO
50 'default' => ',',
51 'add' => '4.3',
4638f0f6 52 'title' => ts('Thousands Separator'),
6a488035
TO
53 'is_domain' => 1,
54 'is_contact' => 0,
08e57c58 55 'help_text' => NULL,
dfe1f88a
CW
56 ],
57 'monetaryDecimalPoint' => [
6a488035
TO
58 'group_name' => 'Localization Preferences',
59 'group' => 'localization',
60 'name' => 'monetaryDecimalPoint',
6a488035
TO
61 'type' => 'String',
62 'quick_form_type' => 'Element',
63 'html_type' => 'text',
dfe1f88a 64 'html_attributes' => [
6a488035 65 'size' => 2,
dfe1f88a 66 ],
6a488035
TO
67 'default' => '.',
68 'add' => '4.3',
4638f0f6 69 'title' => ts('Decimal Delimiter'),
6a488035
TO
70 'is_domain' => 1,
71 'is_contact' => 0,
08e57c58 72 'help_text' => NULL,
dfe1f88a
CW
73 ],
74 'moneyformat' => [
6a488035
TO
75 'group_name' => 'Localization Preferences',
76 'group' => 'localization',
77 'name' => 'moneyformat',
6a488035
TO
78 'type' => 'String',
79 'quick_form_type' => 'Element',
80 'html_type' => 'text',
81 'default' => '%c %a',
82 'add' => '4.3',
4638f0f6 83 'title' => ts('Monetary Amount Display'),
6a488035
TO
84 'is_domain' => 1,
85 'is_contact' => 0,
08e57c58 86 'help_text' => NULL,
dfe1f88a
CW
87 ],
88 'moneyvalueformat' => [
6a488035
TO
89 'group_name' => 'Localization Preferences',
90 'group' => 'localization',
91 'name' => 'moneyvalueformat',
6a488035
TO
92 'type' => 'String',
93 'quick_form_type' => 'Element',
94 'html_type' => 'text',
95 'default' => '%!i',
96 'add' => '4.3',
4638f0f6 97 'title' => ts('Monetary Value Display'),
6a488035
TO
98 'is_domain' => 1,
99 'is_contact' => 0,
08e57c58 100 'help_text' => NULL,
dfe1f88a
CW
101 ],
102 'defaultCurrency' => [
6a488035
TO
103 'group_name' => 'Localization Preferences',
104 'group' => 'localization',
105 'name' => 'defaultCurrency',
6a488035 106 'type' => 'String',
8a61528e
TO
107 'quick_form_type' => 'Select',
108 'html_type' => 'Select',
dfe1f88a 109 'html_attributes' => [
8a61528e 110 'class' => 'crm-select2',
dfe1f88a 111 ],
6a488035
TO
112 'default' => 'USD',
113 'add' => '4.3',
4638f0f6 114 'title' => ts('Default Currency'),
6a488035
TO
115 'is_domain' => 1,
116 'is_contact' => 0,
4638f0f6 117 'description' => ts('Default currency assigned to contributions and other monetary transactions.'),
08e57c58 118 'help_text' => NULL,
dfe1f88a 119 'pseudoconstant' => [
8a61528e 120 'callback' => 'CRM_Admin_Form_Setting_Localization::getCurrencySymbols',
dfe1f88a
CW
121 ],
122 'on_change' => [
ece6501c 123 'CRM_Admin_Form_Setting_Localization::onChangeDefaultCurrency',
dfe1f88a
CW
124 ],
125 ],
126 'defaultContactCountry' => [
f9f9f147
CW
127 'group_name' => 'Localization Preferences',
128 'group' => 'localization',
129 'name' => 'defaultContactCountry',
f9f9f147 130 'type' => 'String',
8a61528e
TO
131 'quick_form_type' => 'Select',
132 'html_type' => 'Select',
dfe1f88a 133 'html_attributes' => [
8a61528e 134 //'class' => 'crm-select2',
dfe1f88a 135 ],
f9f9f147 136 'add' => '4.4',
4638f0f6 137 'title' => ts('Default Country'),
f9f9f147
CW
138 'is_domain' => 1,
139 'is_contact' => 0,
1c8738dd 140 'is_required' => FALSE,
4638f0f6 141 'description' => ts('This value is selected by default when adding a new contact address.'),
08e57c58 142 'help_text' => NULL,
dfe1f88a 143 'pseudoconstant' => [
8a61528e 144 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
dfe1f88a
CW
145 ],
146 ],
147 'defaultContactStateProvince' => [
ee12f1b2 148 'add' => '4.7',
ee12f1b2
TO
149 'help_text' => NULL,
150 'is_domain' => 1,
151 'is_contact' => 0,
152 'group_name' => 'Localization Preferences',
153 'group' => 'localization',
154 'name' => 'defaultContactStateProvince',
155 'type' => 'Integer',
8a61528e
TO
156 'quick_form_type' => 'ChainSelect',
157 'html_type' => 'ChainSelect',
0512a83f
JG
158 'chain_select_settings' => [
159 'control_field' => 'defaultContactCountry',
160 ],
8a61528e
TO
161 //'pseudoconstant' => array(
162 // 'callback' => 'CRM_Core_PseudoConstant::stateProvince',
163 //),
164 //'html_attributes',
165 'default' => NULL,
4638f0f6 166 'title' => ts('Default State/Province'),
167 'description' => ts('This value is selected by default when adding a new contact address.'),
dfe1f88a
CW
168 ],
169 'countryLimit' => [
6a488035
TO
170 'group_name' => 'Localization Preferences',
171 'group' => 'localization',
172 'name' => 'countryLimit',
6a488035 173 'type' => 'Array',
27969f15
J
174 'quick_form_type' => 'Element',
175 'html_type' => 'advmultiselect',
dfe1f88a 176 'html_attributes' => [
27969f15
J
177 'size' => 5,
178 'style' => 'width:150px',
179 'class' => 'advmultiselect',
dfe1f88a
CW
180 ],
181 'default' => [],
6a488035 182 'add' => '4.3',
4638f0f6 183 'title' => ts('Available Countries'),
6a488035
TO
184 'is_domain' => 1,
185 'is_contact' => 0,
08e57c58 186 'help_text' => NULL,
dfe1f88a 187 'pseudoconstant' => [
8a61528e 188 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
dfe1f88a
CW
189 ],
190 ],
191 'provinceLimit' => [
6a488035
TO
192 'group_name' => 'Localization Preferences',
193 'group' => 'localization',
194 'name' => 'provinceLimit',
6a488035 195 'type' => 'Array',
27969f15
J
196 'quick_form_type' => 'Element',
197 'html_type' => 'advmultiselect',
dfe1f88a 198 'html_attributes' => [
27969f15
J
199 'size' => 5,
200 'style' => 'width:150px',
201 'class' => 'advmultiselect',
dfe1f88a
CW
202 ],
203 'default' => [],
6a488035 204 'add' => '4.3',
4638f0f6 205 'title' => ts('Available States and Provinces (by Country)'),
6a488035
TO
206 'is_domain' => 1,
207 'is_contact' => 0,
08e57c58 208 'help_text' => NULL,
dfe1f88a 209 'pseudoconstant' => [
8a61528e 210 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
dfe1f88a
CW
211 ],
212 ],
213 'inheritLocale' => [
6a488035
TO
214 'group_name' => 'Localization Preferences',
215 'group' => 'localization',
216 'name' => 'inheritLocale',
6a488035
TO
217 'type' => 'Boolean',
218 'quick_form_type' => 'YesNo',
219 'default' => '0',
220 'add' => '4.3',
4638f0f6 221 'title' => ts('Inherit CMS Language'),
6a488035
TO
222 'is_domain' => 1,
223 'is_contact' => 0,
08e57c58 224 'help_text' => NULL,
c6cc337b 225 'description' => ts('If Yes, the initial session language will be set by the CMS, which can later be changed if using the CiviCRM language switcher.'),
dfe1f88a
CW
226 ],
227 'dateformatDatetime' => [
6a488035
TO
228 'group_name' => 'Localization Preferences',
229 'group' => 'localization',
230 'name' => 'dateformatDatetime',
6a488035 231 'type' => 'String',
a6c28496
TO
232 'quick_form_type' => 'Element',
233 'html_type' => 'text',
6a488035
TO
234 'default' => '%B %E%f, %Y %l:%M %P',
235 'add' => '4.3',
4638f0f6 236 'title' => ts('Date Format: Complete Date and Time'),
6a488035
TO
237 'is_domain' => 1,
238 'is_contact' => 0,
08e57c58 239 'help_text' => NULL,
dfe1f88a
CW
240 ],
241 'dateformatFull' => [
6a488035
TO
242 'group_name' => 'Localization Preferences',
243 'group' => 'localization',
244 'name' => 'dateformatFull',
6a488035 245 'type' => 'String',
a6c28496
TO
246 'quick_form_type' => 'Element',
247 'html_type' => 'text',
6a488035
TO
248 'default' => '%B %E%f, %Y',
249 'add' => '4.3',
4638f0f6 250 'title' => ts('Date Format: Complete Date'),
6a488035
TO
251 'is_domain' => 1,
252 'is_contact' => 0,
08e57c58 253 'help_text' => NULL,
dfe1f88a
CW
254 ],
255 'dateformatPartial' => [
6a488035
TO
256 'group_name' => 'Localization Preferences',
257 'group' => 'localization',
258 'name' => 'dateformatPartial',
6a488035 259 'type' => 'String',
a6c28496
TO
260 'quick_form_type' => 'Element',
261 'html_type' => 'text',
6a488035
TO
262 'default' => '%B %Y',
263 'add' => '4.3',
4638f0f6 264 'title' => ts('Date Format: Month and Year'),
6a488035
TO
265 'is_domain' => 1,
266 'is_contact' => 0,
08e57c58 267 'help_text' => NULL,
dfe1f88a
CW
268 ],
269 'dateformatTime' => [
9277b874 270 'add' => '4.7',
9277b874
TO
271 'help_text' => NULL,
272 'is_domain' => 1,
273 'is_contact' => 0,
274 'group_name' => 'Localization Preferences',
275 'group' => 'localization',
276 'name' => 'dateformatTime',
277 'type' => 'String',
278 'quick_form_type' => 'Element',
279 'html_type' => 'text',
dfe1f88a 280 'html_attributes' => [
9277b874
TO
281 'size' => '12',
282 'maxlength' => '60',
dfe1f88a 283 ],
9277b874 284 'default' => '%l:%M %P',
4638f0f6 285 'title' => ts('Date Format: Time Only'),
dfe1f88a
CW
286 ],
287 'dateformatYear' => [
9277b874 288 'add' => '4.7',
9277b874
TO
289 'help_text' => NULL,
290 'is_domain' => 1,
291 'is_contact' => 0,
292 'group_name' => 'Localization Preferences',
293 'group' => 'localization',
294 'name' => 'dateformatYear',
295 'type' => 'String',
296 'quick_form_type' => 'Element',
297 'html_type' => 'text',
dfe1f88a 298 'html_attributes' => [
9277b874
TO
299 'size' => '12',
300 'maxlength' => '60',
dfe1f88a 301 ],
9277b874 302 'default' => '%Y',
4638f0f6 303 'title' => ts('Date Format: Year Only'),
dfe1f88a
CW
304 ],
305 'dateformatFinancialBatch' => [
37846436
DRB
306 'add' => '4.7',
307 'help_text' => NULL,
308 'is_domain' => 1,
309 'is_contact' => 0,
310 'group_name' => 'Localization Preferences',
311 'group' => 'localization',
312 'name' => 'dateformatFinancialBatch',
313 'type' => 'String',
314 'quick_form_type' => 'Element',
315 'html_type' => 'text',
dfe1f88a 316 'html_attributes' => [
37846436
DRB
317 'size' => '12',
318 'maxlength' => '60',
dfe1f88a 319 ],
37846436 320 'default' => '%m/%d/%Y',
4638f0f6 321 'title' => ts('Date Format: Financial Batch'),
dfe1f88a
CW
322 ],
323 'dateformatshortdate' => [
080ee9d3
SL
324 'add' => '4.7',
325 'help_text' => NULL,
326 'is_domain' => 1,
327 'is_contact' => 0,
328 'group_name' => 'Localization Preferences',
329 'group' => 'localization',
330 'name' => 'dateformatshortdate',
331 'type' => 'String',
332 'quick_form_type' => 'Element',
333 'html_type' => 'text',
dfe1f88a 334 'html_attributes' => [
080ee9d3
SL
335 'size' => '12',
336 'maxlength' => '60',
dfe1f88a 337 ],
080ee9d3 338 'default' => '%m/%d/%Y',
4638f0f6 339 'title' => ts('Date Format: Short date Month Day Year'),
dfe1f88a
CW
340 ],
341 'dateInputFormat' => [
630d30ec 342 'add' => '4.7',
630d30ec
TO
343 'help_text' => NULL,
344 'is_domain' => 1,
345 'is_contact' => 0,
346 'group_name' => 'Localization Preferences',
347 'group' => 'localization',
348 'name' => 'dateInputFormat',
349 'type' => 'String',
350 'quick_form_type' => 'Select',
351 'html_type' => 'Select',
dfe1f88a 352 'pseudoconstant' => [
630d30ec 353 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats',
dfe1f88a 354 ],
630d30ec 355 'default' => 'mm/dd/yy',
4638f0f6 356 'title' => ts('Date Input Format'),
dfe1f88a
CW
357 ],
358 'fieldSeparator' => [
b7c8991e 359 'add' => '4.7',
b7c8991e
TO
360 'help_text' => NULL,
361 'is_domain' => 1,
362 'is_contact' => 0,
363 'group_name' => 'Localization Preferences',
364 'group' => 'localization',
365 'name' => 'fieldSeparator',
366 'type' => 'String',
367 'quick_form_type' => 'Element',
368 'html_type' => 'text',
dfe1f88a 369 'html_attributes' => [
b7c8991e
TO
370 'size' => '2',
371 'maxlength' => '8',
dfe1f88a 372 ],
b7c8991e 373 'default' => ',',
4638f0f6 374 'title' => ts('Import / Export Field Separator'),
375 'description' => ts('Global CSV separator character. Modify this setting to enable import and export of different kinds of CSV files (for example: \',\' \';\' \':\' \'|\' ).'),
dfe1f88a
CW
376 ],
377 'fiscalYearStart' => [
439b55df 378 'add' => '4.7',
439b55df
TO
379 'help_text' => NULL,
380 'is_domain' => 1,
381 'is_contact' => 0,
382 'group_name' => 'Localization Preferences',
383 'group' => 'localization',
384 'name' => 'fiscalYearStart',
385 'type' => 'Array',
386 'quick_form_type' => 'MonthDay',
387 'html_type' => 'MonthDay',
dfe1f88a 388 'default' => ['M' => 1, 'd' => 1],
4638f0f6 389 'title' => ts('Fiscal Year Start'),
dfe1f88a
CW
390 ],
391 'languageLimit' => [
b72b5fc0
TO
392 'group_name' => 'Localization Preferences',
393 'group' => 'localization',
394 'name' => 'languageLimit',
395 'type' => 'Array',
396 'quick_form_type' => 'Select',
397 'html_type' => 'Select',
dfe1f88a 398 'html_attributes' => [
b72b5fc0
TO
399 'multiple' => 1,
400 'class' => 'crm-select2',
dfe1f88a 401 ],
b72b5fc0
TO
402 'default' => NULL,
403 'add' => '4.3',
4638f0f6 404 'title' => ts('Available Languages (Multi-lingual)'),
b72b5fc0
TO
405 'is_domain' => 1,
406 'is_contact' => 0,
b72b5fc0 407 'help_text' => NULL,
dfe1f88a 408 'pseudoconstant' => [
b72b5fc0 409 'callback' => 'CRM_Core_I18n::languages',
dfe1f88a
CW
410 ],
411 ],
412 'uiLanguages' => [
fe810d04
AS
413 'group_name' => 'Localization Preferences',
414 'group' => 'localization',
415 'name' => 'uiLanguages',
416 'type' => 'Array',
417 'quick_form_type' => 'Select',
418 'html_type' => 'select',
dfe1f88a 419 'html_attributes' => [
fe810d04
AS
420 'multiple' => 1,
421 'class' => 'crm-select2',
dfe1f88a 422 ],
fe810d04
AS
423 'default' => NULL,
424 'add' => '5.9',
4638f0f6 425 'title' => ts('Available Languages'),
fe810d04
AS
426 'is_domain' => 1,
427 'is_contact' => 0,
0d9426af 428 'help_text' => ts('User Interface languages available to users'),
dfe1f88a 429 'pseudoconstant' => [
fe810d04 430 'callback' => 'CRM_Core_I18n::languages',
dfe1f88a
CW
431 ],
432 ],
433 'lcMessages' => [
6a488035
TO
434 'group_name' => 'Localization Preferences',
435 'group' => 'localization',
436 'name' => 'lcMessages',
6a488035 437 'type' => 'String',
8a61528e
TO
438 'quick_form_type' => 'Select',
439 'html_type' => 'Select',
dfe1f88a 440 'html_attributes' => [
8a61528e 441 'class' => 'crm-select2',
dfe1f88a 442 ],
6a488035
TO
443 'default' => 'en_US',
444 'add' => '4.3',
d7fbd134 445 'title' => ts('Default Language'),
6a488035
TO
446 'is_domain' => 1,
447 'is_contact' => 0,
08e57c58 448 'help_text' => NULL,
dfe1f88a 449 'pseudoconstant' => [
8a61528e 450 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions',
dfe1f88a
CW
451 ],
452 'on_change' => [
b72b5fc0 453 'CRM_Admin_Form_Setting_Localization::onChangeLcMessages',
dfe1f88a
CW
454 ],
455 ],
456 'legacyEncoding' => [
b7c8991e 457 'add' => '4.7',
b7c8991e
TO
458 'help_text' => NULL,
459 'is_domain' => 1,
460 'is_contact' => 0,
461 'group_name' => 'Localization Preferences',
462 'group' => 'localization',
463 'name' => 'legacyEncoding',
464 'type' => 'String',
465 'quick_form_type' => 'Element',
466 'html_type' => 'text',
dfe1f88a 467 'html_attributes' => [
b7c8991e
TO
468 'size' => '12',
469 'maxlength' => '30',
dfe1f88a 470 ],
b7c8991e 471 'default' => 'Windows-1252',
d7fbd134 472 'title' => ts('Legacy Encoding'),
4638f0f6 473 'description' => ts('If import files are NOT encoded as UTF-8, specify an alternate character encoding for these files. The default of Windows-1252 will work for Excel-created .CSV files on many computers.'),
dfe1f88a
CW
474 ],
475 'timeInputFormat' => [
630d30ec 476 'add' => '4.7',
630d30ec
TO
477 'help_text' => NULL,
478 'is_domain' => 1,
479 'is_contact' => 0,
480 'group_name' => 'Localization Preferences',
481 'group' => 'localization',
482 'name' => 'timeInputFormat',
483 'type' => 'String',
484 'quick_form_type' => 'Select',
485 'html_type' => 'Select',
dfe1f88a 486 'pseudoconstant' => [
630d30ec 487 'callback' => 'CRM_Core_SelectValues::getTimeFormats',
dfe1f88a 488 ],
630d30ec 489 'default' => '1',
d7fbd134 490 'title' => ts('Time Input Format'),
dfe1f88a 491 'on_change' => [
630d30ec 492 'CRM_Core_BAO_PreferencesDate::onChangeSetting',
dfe1f88a
CW
493 ],
494 ],
495 'weekBegins' => [
6d9ac92c
CW
496 'group_name' => 'Localization Preferences',
497 'group' => 'localization',
498 'name' => 'weekBegins',
499 'type' => 'String',
976afa8f
TO
500 'quick_form_type' => 'Select',
501 'html_type' => 'Select',
dfe1f88a 502 'pseudoconstant' => [
976afa8f 503 'callback' => 'CRM_Utils_Date::getFullWeekdayNames',
dfe1f88a 504 ],
6d9ac92c
CW
505 'default' => '0',
506 'add' => '4.7',
d7fbd134 507 'title' => ts('Week begins on'),
6d9ac92c
CW
508 'is_domain' => 1,
509 'is_contact' => 0,
6d9ac92c 510 'help_text' => NULL,
dfe1f88a
CW
511 ],
512 'contact_default_language' => [
9747df8a 513 'group_name' => 'Localization Preferences',
514 'group' => 'localization',
515 'name' => 'contact_default_language',
516 'type' => 'String',
9c325795
TO
517 'quick_form_type' => 'Select',
518 'html_type' => 'Select',
dfe1f88a 519 'html_attributes' => [
9c325795 520 'class' => 'crm-select2',
dfe1f88a
CW
521 ],
522 'pseudoconstant' => [
9c325795 523 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions',
dfe1f88a 524 ],
9747df8a 525 'default' => '*default*',
526 'add' => '4.7',
4638f0f6 527 'title' => ts('Default Language for contacts'),
9747df8a 528 'is_domain' => 1,
529 'is_contact' => 0,
c6cc337b 530 'description' => ts('Default language (if any) for contact records.'),
9747df8a 531 'help_text' => 'If a contact is created with no language this setting will determine the language data (if any) to save.'
532 . 'You may or may not wish to make an assumption here about whether it matches the site language',
dfe1f88a 533 ],
3a260ed6 534 'pinnedContactCountries' => [
3c4a4657
SP
535 'group_name' => 'Localization Preferences',
536 'group' => 'localization',
3a260ed6 537 'name' => 'pinnedContactCountries',
3c4a4657
SP
538 'type' => 'Array',
539 'quick_form_type' => 'Element',
540 'html_type' => 'advmultiselect',
541 'html_attributes' => [
542 'size' => 5,
543 'style' => 'width:150px',
544 'class' => 'advmultiselect',
545 ],
546 'default' => [],
3a260ed6 547 'add' => '5.33',
b9f01115 548 'title' => ts('Pinned Countries'),
3c4a4657
SP
549 'is_domain' => 1,
550 'is_contact' => 0,
551 'description' => ts('Appear in Top section of select list'),
7b11bd27 552 'help_text' => ts('Selected countries will appear in top section of country list'),
3c4a4657
SP
553 'pseudoconstant' => [
554 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
555 ],
556 ],
dfe1f88a 557];