Closed t-muir closed 3 years ago
That is not as simple, as it seems. There are a lot of language files, shipped with calendarfield (see https://github.com/hofff/contao-calendarfield/tree/master/CT_ROOT/assets/hofff/calendarfield/jquery-ui.datepicker/js/i18n). Some only with short language identifier (e.g. de
) and some with complete locale (e.g. en-GB
).
If the page language is en
, we need a mapping to en-GB
(see here: https://github.com/hofff/contao-calendarfield/blob/master/CT_ROOT/system/modules/hofff_calendarfield/forms/FormCalendarField.php#L80). But if the page language is de-CH
, the mapping shall be de
.
I think this part should be configurable. In the easiest way via TL_CONFIG
. That is also good for overwriting.
@frontendschlampe What's your opinion?
Will be changed with version 4.0.0
Changed to flatpickr since 15d352d94476df58e04f9d7d6d70b4db5757ca7b
The module is works ok with simple language settings like "de" or "en".
If the language of the page has been set to an extended locale, such es de-DE and de-CH, the module passes a language setting and creates a path to a language file that does not exist:
Maybe something like: