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