Merge pull request #19629 from MegaphoneJon/core-2386
[civicrm-core.git] / settings / Localization.setting.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 /*
18 * Settings metadata file
19 */
20
21 return [
22 'customTranslateFunction' => [
23 'add' => '4.7',
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',
33 'html_attributes' => [
34 'size' => '30',
35 'maxlength' => '100',
36 ],
37 'default' => NULL,
38 'title' => ts('Custom Translate Function'),
39 ],
40 'monetaryThousandSeparator' => [
41 'group_name' => 'Localization Preferences',
42 'group' => 'localization',
43 'name' => 'monetaryThousandSeparator',
44 'type' => 'String',
45 'quick_form_type' => 'Element',
46 'html_type' => 'text',
47 'html_attributes' => [
48 'size' => 2,
49 ],
50 'default' => ',',
51 'add' => '4.3',
52 'title' => ts('Thousands Separator'),
53 'is_domain' => 1,
54 'is_contact' => 0,
55 'help_text' => NULL,
56 ],
57 'monetaryDecimalPoint' => [
58 'group_name' => 'Localization Preferences',
59 'group' => 'localization',
60 'name' => 'monetaryDecimalPoint',
61 'type' => 'String',
62 'quick_form_type' => 'Element',
63 'html_type' => 'text',
64 'html_attributes' => [
65 'size' => 2,
66 ],
67 'default' => '.',
68 'add' => '4.3',
69 'title' => ts('Decimal Delimiter'),
70 'is_domain' => 1,
71 'is_contact' => 0,
72 'help_text' => NULL,
73 ],
74 'moneyformat' => [
75 'group_name' => 'Localization Preferences',
76 'group' => 'localization',
77 'name' => 'moneyformat',
78 'type' => 'String',
79 'quick_form_type' => 'Element',
80 'html_type' => 'text',
81 'default' => '%c %a',
82 'add' => '4.3',
83 'title' => ts('Monetary Amount Display'),
84 'is_domain' => 1,
85 'is_contact' => 0,
86 'help_text' => NULL,
87 ],
88 'moneyvalueformat' => [
89 'group_name' => 'Localization Preferences',
90 'group' => 'localization',
91 'name' => 'moneyvalueformat',
92 'type' => 'String',
93 'quick_form_type' => 'Element',
94 'html_type' => 'text',
95 'default' => '%!i',
96 'add' => '4.3',
97 'title' => ts('Monetary Value Display'),
98 'is_domain' => 1,
99 'is_contact' => 0,
100 'help_text' => NULL,
101 ],
102 'defaultCurrency' => [
103 'group_name' => 'Localization Preferences',
104 'group' => 'localization',
105 'name' => 'defaultCurrency',
106 'type' => 'String',
107 'quick_form_type' => 'Select',
108 'html_type' => 'Select',
109 'html_attributes' => [
110 'class' => 'crm-select2',
111 ],
112 'default' => 'USD',
113 'add' => '4.3',
114 'title' => ts('Default Currency'),
115 'is_domain' => 1,
116 'is_contact' => 0,
117 'description' => ts('Default currency assigned to contributions and other monetary transactions.'),
118 'help_text' => NULL,
119 'pseudoconstant' => [
120 'callback' => 'CRM_Admin_Form_Setting_Localization::getCurrencySymbols',
121 ],
122 'on_change' => [
123 'CRM_Admin_Form_Setting_Localization::onChangeDefaultCurrency',
124 ],
125 ],
126 'defaultContactCountry' => [
127 'group_name' => 'Localization Preferences',
128 'group' => 'localization',
129 'name' => 'defaultContactCountry',
130 'type' => 'String',
131 'quick_form_type' => 'Select',
132 'html_type' => 'Select',
133 'html_attributes' => [
134 //'class' => 'crm-select2',
135 ],
136 'add' => '4.4',
137 'title' => ts('Default Country'),
138 'is_domain' => 1,
139 'is_contact' => 0,
140 'is_required' => FALSE,
141 'description' => ts('This value is selected by default when adding a new contact address.'),
142 'help_text' => NULL,
143 'pseudoconstant' => [
144 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
145 ],
146 ],
147 'defaultContactStateProvince' => [
148 'add' => '4.7',
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',
156 'quick_form_type' => 'ChainSelect',
157 'html_type' => 'ChainSelect',
158 'chain_select_settings' => [
159 'control_field' => 'defaultContactCountry',
160 ],
161 //'pseudoconstant' => array(
162 // 'callback' => 'CRM_Core_PseudoConstant::stateProvince',
163 //),
164 //'html_attributes',
165 'default' => NULL,
166 'title' => ts('Default State/Province'),
167 'description' => ts('This value is selected by default when adding a new contact address.'),
168 ],
169 'countryLimit' => [
170 'group_name' => 'Localization Preferences',
171 'group' => 'localization',
172 'name' => 'countryLimit',
173 'type' => 'Array',
174 'quick_form_type' => 'Element',
175 'html_type' => 'advmultiselect',
176 'html_attributes' => [
177 'size' => 5,
178 'style' => 'width:150px',
179 'class' => 'advmultiselect',
180 ],
181 'default' => [],
182 'add' => '4.3',
183 'title' => ts('Available Countries'),
184 'is_domain' => 1,
185 'is_contact' => 0,
186 'help_text' => NULL,
187 'pseudoconstant' => [
188 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
189 ],
190 ],
191 'provinceLimit' => [
192 'group_name' => 'Localization Preferences',
193 'group' => 'localization',
194 'name' => 'provinceLimit',
195 'type' => 'Array',
196 'quick_form_type' => 'Element',
197 'html_type' => 'advmultiselect',
198 'html_attributes' => [
199 'size' => 5,
200 'style' => 'width:150px',
201 'class' => 'advmultiselect',
202 ],
203 'default' => [],
204 'add' => '4.3',
205 'title' => ts('Available States and Provinces (by Country)'),
206 'is_domain' => 1,
207 'is_contact' => 0,
208 'help_text' => NULL,
209 'pseudoconstant' => [
210 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
211 ],
212 ],
213 'inheritLocale' => [
214 'group_name' => 'Localization Preferences',
215 'group' => 'localization',
216 'name' => 'inheritLocale',
217 'type' => 'Boolean',
218 'quick_form_type' => 'YesNo',
219 'default' => '0',
220 'add' => '4.3',
221 'title' => ts('Inherit CMS Language'),
222 'is_domain' => 1,
223 'is_contact' => 0,
224 'help_text' => NULL,
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.'),
226 ],
227 'dateformatDatetime' => [
228 'group_name' => 'Localization Preferences',
229 'group' => 'localization',
230 'name' => 'dateformatDatetime',
231 'type' => 'String',
232 'quick_form_type' => 'Element',
233 'html_type' => 'text',
234 'default' => '%B %E%f, %Y %l:%M %P',
235 'add' => '4.3',
236 'title' => ts('Date Format: Complete Date and Time'),
237 'is_domain' => 1,
238 'is_contact' => 0,
239 'help_text' => NULL,
240 ],
241 'dateformatFull' => [
242 'group_name' => 'Localization Preferences',
243 'group' => 'localization',
244 'name' => 'dateformatFull',
245 'type' => 'String',
246 'quick_form_type' => 'Element',
247 'html_type' => 'text',
248 'default' => '%B %E%f, %Y',
249 'add' => '4.3',
250 'title' => ts('Date Format: Complete Date'),
251 'is_domain' => 1,
252 'is_contact' => 0,
253 'help_text' => NULL,
254 ],
255 'dateformatPartial' => [
256 'group_name' => 'Localization Preferences',
257 'group' => 'localization',
258 'name' => 'dateformatPartial',
259 'type' => 'String',
260 'quick_form_type' => 'Element',
261 'html_type' => 'text',
262 'default' => '%B %Y',
263 'add' => '4.3',
264 'title' => ts('Date Format: Month and Year'),
265 'is_domain' => 1,
266 'is_contact' => 0,
267 'help_text' => NULL,
268 ],
269 'dateformatTime' => [
270 'add' => '4.7',
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',
280 'html_attributes' => [
281 'size' => '12',
282 'maxlength' => '60',
283 ],
284 'default' => '%l:%M %P',
285 'title' => ts('Date Format: Time Only'),
286 ],
287 'dateformatYear' => [
288 'add' => '4.7',
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',
298 'html_attributes' => [
299 'size' => '12',
300 'maxlength' => '60',
301 ],
302 'default' => '%Y',
303 'title' => ts('Date Format: Year Only'),
304 ],
305 'dateformatFinancialBatch' => [
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',
316 'html_attributes' => [
317 'size' => '12',
318 'maxlength' => '60',
319 ],
320 'default' => '%m/%d/%Y',
321 'title' => ts('Date Format: Financial Batch'),
322 ],
323 'dateformatshortdate' => [
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',
334 'html_attributes' => [
335 'size' => '12',
336 'maxlength' => '60',
337 ],
338 'default' => '%m/%d/%Y',
339 'title' => ts('Date Format: Short date Month Day Year'),
340 ],
341 'dateInputFormat' => [
342 'add' => '4.7',
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',
352 'pseudoconstant' => [
353 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats',
354 ],
355 'default' => 'mm/dd/yy',
356 'title' => ts('Date Input Format'),
357 ],
358 'fieldSeparator' => [
359 'add' => '4.7',
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',
369 'html_attributes' => [
370 'size' => '2',
371 'maxlength' => '8',
372 ],
373 'default' => ',',
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: \',\' \';\' \':\' \'|\' ).'),
376 ],
377 'fiscalYearStart' => [
378 'add' => '4.7',
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',
388 'default' => ['M' => 1, 'd' => 1],
389 'title' => ts('Fiscal Year Start'),
390 ],
391 'languageLimit' => [
392 'group_name' => 'Localization Preferences',
393 'group' => 'localization',
394 'name' => 'languageLimit',
395 'type' => 'Array',
396 'quick_form_type' => 'Select',
397 'html_type' => 'Select',
398 'html_attributes' => [
399 'multiple' => 1,
400 'class' => 'crm-select2',
401 ],
402 'default' => NULL,
403 'add' => '4.3',
404 'title' => ts('Available Languages (Multi-lingual)'),
405 'is_domain' => 1,
406 'is_contact' => 0,
407 'help_text' => NULL,
408 'pseudoconstant' => [
409 'callback' => 'CRM_Core_I18n::languages',
410 ],
411 ],
412 'uiLanguages' => [
413 'group_name' => 'Localization Preferences',
414 'group' => 'localization',
415 'name' => 'uiLanguages',
416 'type' => 'Array',
417 'quick_form_type' => 'Select',
418 'html_type' => 'select',
419 'html_attributes' => [
420 'multiple' => 1,
421 'class' => 'crm-select2',
422 ],
423 'default' => NULL,
424 'add' => '5.9',
425 'title' => ts('Available Languages'),
426 'is_domain' => 1,
427 'is_contact' => 0,
428 'help_text' => ts('User Interface languages available to users'),
429 'pseudoconstant' => [
430 'callback' => 'CRM_Core_I18n::languages',
431 ],
432 ],
433 'lcMessages' => [
434 'group_name' => 'Localization Preferences',
435 'group' => 'localization',
436 'name' => 'lcMessages',
437 'type' => 'String',
438 'quick_form_type' => 'Select',
439 'html_type' => 'Select',
440 'html_attributes' => [
441 'class' => 'crm-select2',
442 ],
443 'default' => 'en_US',
444 'add' => '4.3',
445 'title' => ts('Default Language'),
446 'is_domain' => 1,
447 'is_contact' => 0,
448 'help_text' => NULL,
449 'pseudoconstant' => [
450 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions',
451 ],
452 'on_change' => [
453 'CRM_Admin_Form_Setting_Localization::onChangeLcMessages',
454 ],
455 ],
456 'legacyEncoding' => [
457 'add' => '4.7',
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',
467 'html_attributes' => [
468 'size' => '12',
469 'maxlength' => '30',
470 ],
471 'default' => 'Windows-1252',
472 'title' => ts('Legacy Encoding'),
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.'),
474 ],
475 'timeInputFormat' => [
476 'add' => '4.7',
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',
486 'pseudoconstant' => [
487 'callback' => 'CRM_Core_SelectValues::getTimeFormats',
488 ],
489 'default' => '1',
490 'title' => ts('Time Input Format'),
491 'on_change' => [
492 'CRM_Core_BAO_PreferencesDate::onChangeSetting',
493 ],
494 ],
495 'weekBegins' => [
496 'group_name' => 'Localization Preferences',
497 'group' => 'localization',
498 'name' => 'weekBegins',
499 'type' => 'String',
500 'quick_form_type' => 'Select',
501 'html_type' => 'Select',
502 'pseudoconstant' => [
503 'callback' => 'CRM_Utils_Date::getFullWeekdayNames',
504 ],
505 'default' => '0',
506 'add' => '4.7',
507 'title' => ts('Week begins on'),
508 'is_domain' => 1,
509 'is_contact' => 0,
510 'help_text' => NULL,
511 ],
512 'contact_default_language' => [
513 'group_name' => 'Localization Preferences',
514 'group' => 'localization',
515 'name' => 'contact_default_language',
516 'type' => 'String',
517 'quick_form_type' => 'Select',
518 'html_type' => 'Select',
519 'html_attributes' => [
520 'class' => 'crm-select2',
521 ],
522 'pseudoconstant' => [
523 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions',
524 ],
525 'default' => '*default*',
526 'add' => '4.7',
527 'title' => ts('Default Language for contacts'),
528 'is_domain' => 1,
529 'is_contact' => 0,
530 'description' => ts('Default language (if any) for contact records.'),
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',
533 ],
534 'pinnedContactCountries' => [
535 'group_name' => 'Localization Preferences',
536 'group' => 'localization',
537 'name' => 'pinnedContactCountries',
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' => [],
547 'add' => '5.33',
548 'title' => ts('Pinned Countries'),
549 'is_domain' => 1,
550 'is_contact' => 0,
551 'description' => ts('Appear in Top section of select list'),
552 'help_text' => ts('Selected countries will appear in top section of country list'),
553 'pseudoconstant' => [
554 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries',
555 ],
556 ],
557 ];