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