Merge pull request #17078 from herbdool/ui-18
[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,
c6cc337b 224 '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
225 ],
226 'dateformatDatetime' => [
6a488035
TO
227 'group_name' => 'Localization Preferences',
228 'group' => 'localization',
229 'name' => 'dateformatDatetime',
6a488035 230 'type' => 'String',
a6c28496
TO
231 'quick_form_type' => 'Element',
232 'html_type' => 'text',
6a488035
TO
233 'default' => '%B %E%f, %Y %l:%M %P',
234 'add' => '4.3',
4638f0f6 235 'title' => ts('Date Format: Complete Date and Time'),
6a488035
TO
236 'is_domain' => 1,
237 'is_contact' => 0,
08e57c58 238 'help_text' => NULL,
dfe1f88a
CW
239 ],
240 'dateformatFull' => [
6a488035
TO
241 'group_name' => 'Localization Preferences',
242 'group' => 'localization',
243 'name' => 'dateformatFull',
6a488035 244 'type' => 'String',
a6c28496
TO
245 'quick_form_type' => 'Element',
246 'html_type' => 'text',
6a488035
TO
247 'default' => '%B %E%f, %Y',
248 'add' => '4.3',
4638f0f6 249 'title' => ts('Date Format: Complete Date'),
6a488035
TO
250 'is_domain' => 1,
251 'is_contact' => 0,
08e57c58 252 'help_text' => NULL,
dfe1f88a
CW
253 ],
254 'dateformatPartial' => [
6a488035
TO
255 'group_name' => 'Localization Preferences',
256 'group' => 'localization',
257 'name' => 'dateformatPartial',
6a488035 258 'type' => 'String',
a6c28496
TO
259 'quick_form_type' => 'Element',
260 'html_type' => 'text',
6a488035
TO
261 'default' => '%B %Y',
262 'add' => '4.3',
4638f0f6 263 'title' => ts('Date Format: Month and Year'),
6a488035
TO
264 'is_domain' => 1,
265 'is_contact' => 0,
08e57c58 266 'help_text' => NULL,
dfe1f88a
CW
267 ],
268 'dateformatTime' => [
9277b874 269 'add' => '4.7',
9277b874
TO
270 'help_text' => NULL,
271 'is_domain' => 1,
272 'is_contact' => 0,
273 'group_name' => 'Localization Preferences',
274 'group' => 'localization',
275 'name' => 'dateformatTime',
276 'type' => 'String',
277 'quick_form_type' => 'Element',
278 'html_type' => 'text',
dfe1f88a 279 'html_attributes' => [
9277b874
TO
280 'size' => '12',
281 'maxlength' => '60',
dfe1f88a 282 ],
9277b874 283 'default' => '%l:%M %P',
4638f0f6 284 'title' => ts('Date Format: Time Only'),
dfe1f88a
CW
285 ],
286 'dateformatYear' => [
9277b874 287 'add' => '4.7',
9277b874
TO
288 'help_text' => NULL,
289 'is_domain' => 1,
290 'is_contact' => 0,
291 'group_name' => 'Localization Preferences',
292 'group' => 'localization',
293 'name' => 'dateformatYear',
294 'type' => 'String',
295 'quick_form_type' => 'Element',
296 'html_type' => 'text',
dfe1f88a 297 'html_attributes' => [
9277b874
TO
298 'size' => '12',
299 'maxlength' => '60',
dfe1f88a 300 ],
9277b874 301 'default' => '%Y',
4638f0f6 302 'title' => ts('Date Format: Year Only'),
dfe1f88a
CW
303 ],
304 'dateformatFinancialBatch' => [
37846436
DRB
305 'add' => '4.7',
306 'help_text' => NULL,
307 'is_domain' => 1,
308 'is_contact' => 0,
309 'group_name' => 'Localization Preferences',
310 'group' => 'localization',
311 'name' => 'dateformatFinancialBatch',
312 'type' => 'String',
313 'quick_form_type' => 'Element',
314 'html_type' => 'text',
dfe1f88a 315 'html_attributes' => [
37846436
DRB
316 'size' => '12',
317 'maxlength' => '60',
dfe1f88a 318 ],
37846436 319 'default' => '%m/%d/%Y',
4638f0f6 320 'title' => ts('Date Format: Financial Batch'),
dfe1f88a
CW
321 ],
322 'dateformatshortdate' => [
080ee9d3
SL
323 'add' => '4.7',
324 'help_text' => NULL,
325 'is_domain' => 1,
326 'is_contact' => 0,
327 'group_name' => 'Localization Preferences',
328 'group' => 'localization',
329 'name' => 'dateformatshortdate',
330 'type' => 'String',
331 'quick_form_type' => 'Element',
332 'html_type' => 'text',
dfe1f88a 333 'html_attributes' => [
080ee9d3
SL
334 'size' => '12',
335 'maxlength' => '60',
dfe1f88a 336 ],
080ee9d3 337 'default' => '%m/%d/%Y',
4638f0f6 338 'title' => ts('Date Format: Short date Month Day Year'),
dfe1f88a
CW
339 ],
340 'dateInputFormat' => [
630d30ec 341 'add' => '4.7',
630d30ec
TO
342 'help_text' => NULL,
343 'is_domain' => 1,
344 'is_contact' => 0,
345 'group_name' => 'Localization Preferences',
346 'group' => 'localization',
347 'name' => 'dateInputFormat',
348 'type' => 'String',
349 'quick_form_type' => 'Select',
350 'html_type' => 'Select',
dfe1f88a 351 'pseudoconstant' => [
630d30ec 352 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats',
dfe1f88a 353 ],
630d30ec 354 'default' => 'mm/dd/yy',
4638f0f6 355 'title' => ts('Date Input Format'),
dfe1f88a
CW
356 ],
357 'fieldSeparator' => [
b7c8991e 358 'add' => '4.7',
b7c8991e
TO
359 'help_text' => NULL,
360 'is_domain' => 1,
361 'is_contact' => 0,
362 'group_name' => 'Localization Preferences',
363 'group' => 'localization',
364 'name' => 'fieldSeparator',
365 'type' => 'String',
366 'quick_form_type' => 'Element',
367 'html_type' => 'text',
dfe1f88a 368 'html_attributes' => [
b7c8991e
TO
369 'size' => '2',
370 'maxlength' => '8',
dfe1f88a 371 ],
b7c8991e 372 'default' => ',',
4638f0f6 373 'title' => ts('Import / Export Field Separator'),
374 'description' => ts('Global CSV separator character. Modify this setting to enable import and export of different kinds of CSV files (for example: \',\' \';\' \':\' \'|\' ).'),
dfe1f88a
CW
375 ],
376 'fiscalYearStart' => [
439b55df 377 'add' => '4.7',
439b55df
TO
378 'help_text' => NULL,
379 'is_domain' => 1,
380 'is_contact' => 0,
381 'group_name' => 'Localization Preferences',
382 'group' => 'localization',
383 'name' => 'fiscalYearStart',
384 'type' => 'Array',
385 'quick_form_type' => 'MonthDay',
386 'html_type' => 'MonthDay',
dfe1f88a 387 'default' => ['M' => 1, 'd' => 1],
4638f0f6 388 'title' => ts('Fiscal Year Start'),
dfe1f88a
CW
389 ],
390 'languageLimit' => [
b72b5fc0
TO
391 'group_name' => 'Localization Preferences',
392 'group' => 'localization',
393 'name' => 'languageLimit',
394 'type' => 'Array',
395 'quick_form_type' => 'Select',
396 'html_type' => 'Select',
dfe1f88a 397 'html_attributes' => [
b72b5fc0
TO
398 'multiple' => 1,
399 'class' => 'crm-select2',
dfe1f88a 400 ],
b72b5fc0
TO
401 'default' => NULL,
402 'add' => '4.3',
4638f0f6 403 'title' => ts('Available Languages (Multi-lingual)'),
b72b5fc0
TO
404 'is_domain' => 1,
405 'is_contact' => 0,
b72b5fc0 406 'help_text' => NULL,
dfe1f88a 407 'pseudoconstant' => [
b72b5fc0 408 'callback' => 'CRM_Core_I18n::languages',
dfe1f88a
CW
409 ],
410 ],
411 'uiLanguages' => [
fe810d04
AS
412 'group_name' => 'Localization Preferences',
413 'group' => 'localization',
414 'name' => 'uiLanguages',
415 'type' => 'Array',
416 'quick_form_type' => 'Select',
417 'html_type' => 'select',
dfe1f88a 418 'html_attributes' => [
fe810d04
AS
419 'multiple' => 1,
420 'class' => 'crm-select2',
dfe1f88a 421 ],
fe810d04
AS
422 'default' => NULL,
423 'add' => '5.9',
4638f0f6 424 'title' => ts('Available Languages'),
fe810d04
AS
425 'is_domain' => 1,
426 'is_contact' => 0,
0d9426af 427 'help_text' => ts('User Interface languages available to users'),
dfe1f88a 428 'pseudoconstant' => [
fe810d04 429 'callback' => 'CRM_Core_I18n::languages',
dfe1f88a
CW
430 ],
431 ],
432 'lcMessages' => [
6a488035
TO
433 'group_name' => 'Localization Preferences',
434 'group' => 'localization',
435 'name' => 'lcMessages',
6a488035 436 'type' => 'String',
8a61528e
TO
437 'quick_form_type' => 'Select',
438 'html_type' => 'Select',
dfe1f88a 439 'html_attributes' => [
8a61528e 440 'class' => 'crm-select2',
dfe1f88a 441 ],
6a488035
TO
442 'default' => 'en_US',
443 'add' => '4.3',
d7fbd134 444 'title' => ts('Default Language'),
6a488035
TO
445 'is_domain' => 1,
446 'is_contact' => 0,
08e57c58 447 'help_text' => NULL,
dfe1f88a 448 'pseudoconstant' => [
8a61528e 449 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions',
dfe1f88a
CW
450 ],
451 'on_change' => [
b72b5fc0 452 'CRM_Admin_Form_Setting_Localization::onChangeLcMessages',
dfe1f88a
CW
453 ],
454 ],
455 'legacyEncoding' => [
b7c8991e 456 'add' => '4.7',
b7c8991e
TO
457 'help_text' => NULL,
458 'is_domain' => 1,
459 'is_contact' => 0,
460 'group_name' => 'Localization Preferences',
461 'group' => 'localization',
462 'name' => 'legacyEncoding',
463 'type' => 'String',
464 'quick_form_type' => 'Element',
465 'html_type' => 'text',
dfe1f88a 466 'html_attributes' => [
b7c8991e
TO
467 'size' => '12',
468 'maxlength' => '30',
dfe1f88a 469 ],
b7c8991e 470 'default' => 'Windows-1252',
d7fbd134 471 'title' => ts('Legacy Encoding'),
4638f0f6 472 '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
473 ],
474 'timeInputFormat' => [
630d30ec 475 'add' => '4.7',
630d30ec
TO
476 'help_text' => NULL,
477 'is_domain' => 1,
478 'is_contact' => 0,
479 'group_name' => 'Localization Preferences',
480 'group' => 'localization',
481 'name' => 'timeInputFormat',
482 'type' => 'String',
483 'quick_form_type' => 'Select',
484 'html_type' => 'Select',
dfe1f88a 485 'pseudoconstant' => [
630d30ec 486 'callback' => 'CRM_Core_SelectValues::getTimeFormats',
dfe1f88a 487 ],
630d30ec 488 'default' => '1',
d7fbd134 489 'title' => ts('Time Input Format'),
dfe1f88a 490 'on_change' => [
630d30ec 491 'CRM_Core_BAO_PreferencesDate::onChangeSetting',
dfe1f88a
CW
492 ],
493 ],
494 'weekBegins' => [
6d9ac92c
CW
495 'group_name' => 'Localization Preferences',
496 'group' => 'localization',
497 'name' => 'weekBegins',
498 'type' => 'String',
976afa8f
TO
499 'quick_form_type' => 'Select',
500 'html_type' => 'Select',
dfe1f88a 501 'pseudoconstant' => [
976afa8f 502 'callback' => 'CRM_Utils_Date::getFullWeekdayNames',
dfe1f88a 503 ],
6d9ac92c
CW
504 'default' => '0',
505 'add' => '4.7',
d7fbd134 506 'title' => ts('Week begins on'),
6d9ac92c
CW
507 'is_domain' => 1,
508 'is_contact' => 0,
6d9ac92c 509 'help_text' => NULL,
dfe1f88a
CW
510 ],
511 'contact_default_language' => [
9747df8a 512 'group_name' => 'Localization Preferences',
513 'group' => 'localization',
514 'name' => 'contact_default_language',
515 'type' => 'String',
9c325795
TO
516 'quick_form_type' => 'Select',
517 'html_type' => 'Select',
dfe1f88a 518 'html_attributes' => [
9c325795 519 'class' => 'crm-select2',
dfe1f88a
CW
520 ],
521 'pseudoconstant' => [
9c325795 522 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions',
dfe1f88a 523 ],
9747df8a 524 'default' => '*default*',
525 'add' => '4.7',
4638f0f6 526 'title' => ts('Default Language for contacts'),
9747df8a 527 'is_domain' => 1,
528 'is_contact' => 0,
c6cc337b 529 'description' => ts('Default language (if any) for contact records.'),
9747df8a 530 'help_text' => 'If a contact is created with no language this setting will determine the language data (if any) to save.'
531 . 'You may or may not wish to make an assumption here about whether it matches the site language',
dfe1f88a
CW
532 ],
533];