Merge pull request #15969 from eileenmcnaughton/utfmb8
[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 ],
225 'dateformatDatetime' => [
226 'group_name' => 'Localization Preferences',
227 'group' => 'localization',
228 'name' => 'dateformatDatetime',
229 'type' => 'String',
230 'quick_form_type' => 'Element',
231 'html_type' => 'text',
232 'default' => '%B %E%f, %Y %l:%M %P',
233 'add' => '4.3',
234 'title' => ts('Date Format: Complete Date and Time'),
235 'is_domain' => 1,
236 'is_contact' => 0,
237 'help_text' => NULL,
238 ],
239 'dateformatFull' => [
240 'group_name' => 'Localization Preferences',
241 'group' => 'localization',
242 'name' => 'dateformatFull',
243 'type' => 'String',
244 'quick_form_type' => 'Element',
245 'html_type' => 'text',
246 'default' => '%B %E%f, %Y',
247 'add' => '4.3',
248 'title' => ts('Date Format: Complete Date'),
249 'is_domain' => 1,
250 'is_contact' => 0,
251 'help_text' => NULL,
252 ],
253 'dateformatPartial' => [
254 'group_name' => 'Localization Preferences',
255 'group' => 'localization',
256 'name' => 'dateformatPartial',
257 'type' => 'String',
258 'quick_form_type' => 'Element',
259 'html_type' => 'text',
260 'default' => '%B %Y',
261 'add' => '4.3',
262 'title' => ts('Date Format: Month and Year'),
263 'is_domain' => 1,
264 'is_contact' => 0,
265 'help_text' => NULL,
266 ],
267 'dateformatTime' => [
268 'add' => '4.7',
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',
278 'html_attributes' => [
279 'size' => '12',
280 'maxlength' => '60',
281 ],
282 'default' => '%l:%M %P',
283 'title' => ts('Date Format: Time Only'),
284 ],
285 'dateformatYear' => [
286 'add' => '4.7',
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',
296 'html_attributes' => [
297 'size' => '12',
298 'maxlength' => '60',
299 ],
300 'default' => '%Y',
301 'title' => ts('Date Format: Year Only'),
302 ],
303 'dateformatFinancialBatch' => [
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',
314 'html_attributes' => [
315 'size' => '12',
316 'maxlength' => '60',
317 ],
318 'default' => '%m/%d/%Y',
319 'title' => ts('Date Format: Financial Batch'),
320 ],
321 'dateformatshortdate' => [
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',
332 'html_attributes' => [
333 'size' => '12',
334 'maxlength' => '60',
335 ],
336 'default' => '%m/%d/%Y',
337 'title' => ts('Date Format: Short date Month Day Year'),
338 ],
339 'dateInputFormat' => [
340 'add' => '4.7',
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',
350 'pseudoconstant' => [
351 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats',
352 ],
353 'default' => 'mm/dd/yy',
354 'title' => ts('Date Input Format'),
355 ],
356 'fieldSeparator' => [
357 'add' => '4.7',
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',
367 'html_attributes' => [
368 'size' => '2',
369 'maxlength' => '8',
370 ],
371 'default' => ',',
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: \',\' \';\' \':\' \'|\' ).'),
374 ],
375 'fiscalYearStart' => [
376 'add' => '4.7',
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',
386 'default' => ['M' => 1, 'd' => 1],
387 'title' => ts('Fiscal Year Start'),
388 ],
389 'languageLimit' => [
390 'group_name' => 'Localization Preferences',
391 'group' => 'localization',
392 'name' => 'languageLimit',
393 'type' => 'Array',
394 'quick_form_type' => 'Select',
395 'html_type' => 'Select',
396 'html_attributes' => [
397 'multiple' => 1,
398 'class' => 'crm-select2',
399 ],
400 'default' => NULL,
401 'add' => '4.3',
402 'title' => ts('Available Languages (Multi-lingual)'),
403 'is_domain' => 1,
404 'is_contact' => 0,
405 'help_text' => NULL,
406 'pseudoconstant' => [
407 'callback' => 'CRM_Core_I18n::languages',
408 ],
409 ],
410 'uiLanguages' => [
411 'group_name' => 'Localization Preferences',
412 'group' => 'localization',
413 'name' => 'uiLanguages',
414 'type' => 'Array',
415 'quick_form_type' => 'Select',
416 'html_type' => 'select',
417 'html_attributes' => [
418 'multiple' => 1,
419 'class' => 'crm-select2',
420 ],
421 'default' => NULL,
422 'add' => '5.9',
423 'title' => ts('Available Languages'),
424 'is_domain' => 1,
425 'is_contact' => 0,
426 'help_text' => ts('User Interface languages available to users'),
427 'pseudoconstant' => [
428 'callback' => 'CRM_Core_I18n::languages',
429 ],
430 ],
431 'lcMessages' => [
432 'group_name' => 'Localization Preferences',
433 'group' => 'localization',
434 'name' => 'lcMessages',
435 'type' => 'String',
436 'quick_form_type' => 'Select',
437 'html_type' => 'Select',
438 'html_attributes' => [
439 'class' => 'crm-select2',
440 ],
441 'default' => 'en_US',
442 'add' => '4.3',
443 'title' => ts('Default Language'),
444 'is_domain' => 1,
445 'is_contact' => 0,
446 'help_text' => NULL,
447 'pseudoconstant' => [
448 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions',
449 ],
450 'on_change' => [
451 'CRM_Admin_Form_Setting_Localization::onChangeLcMessages',
452 ],
453 ],
454 'legacyEncoding' => [
455 'add' => '4.7',
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',
465 'html_attributes' => [
466 'size' => '12',
467 'maxlength' => '30',
468 ],
469 'default' => 'Windows-1252',
470 'title' => ts('Legacy Encoding'),
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.'),
472 ],
473 'timeInputFormat' => [
474 'add' => '4.7',
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',
484 'pseudoconstant' => [
485 'callback' => 'CRM_Core_SelectValues::getTimeFormats',
486 ],
487 'default' => '1',
488 'title' => ts('Time Input Format'),
489 'on_change' => [
490 'CRM_Core_BAO_PreferencesDate::onChangeSetting',
491 ],
492 ],
493 'weekBegins' => [
494 'group_name' => 'Localization Preferences',
495 'group' => 'localization',
496 'name' => 'weekBegins',
497 'type' => 'String',
498 'quick_form_type' => 'Select',
499 'html_type' => 'Select',
500 'pseudoconstant' => [
501 'callback' => 'CRM_Utils_Date::getFullWeekdayNames',
502 ],
503 'default' => '0',
504 'add' => '4.7',
505 'title' => ts('Week begins on'),
506 'is_domain' => 1,
507 'is_contact' => 0,
508 'help_text' => NULL,
509 ],
510 'contact_default_language' => [
511 'group_name' => 'Localization Preferences',
512 'group' => 'localization',
513 'name' => 'contact_default_language',
514 'type' => 'String',
515 'quick_form_type' => 'Select',
516 'html_type' => 'Select',
517 'html_attributes' => [
518 'class' => 'crm-select2',
519 ],
520 'pseudoconstant' => [
521 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions',
522 ],
523 'default' => '*default*',
524 'add' => '4.7',
525 'title' => ts('Default Language for contacts'),
526 'is_domain' => 1,
527 'is_contact' => 0,
528 'description' => ts('Default language (if any) for contact records'),
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',
531 ],
532 ];