jweiland-net / events2

With this TYPO3 extension you can organize one, multiple and recurring events.
GNU General Public License v2.0
18 stars 16 forks source link

[Feature Request] Litepicker set language #404

Open derBoogie opened 1 year ago

derBoogie commented 1 year ago

The Litepicker is in English language by default. To change the language, it's necessary to set the "lang" option on initialization:

Events2.js:

me.initializeDatePicker = function () {
    document.querySelectorAll('.addDatePicker').forEach($inputWithDatePicker => {
        new Litepicker({
            element: $inputWithDatePicker,
            format: me.dateFormat,
            singleMode: true,
            resetButton: true,
            lang: 'de-DE'
        });
    });
};
sfroemkenjw commented 1 year ago

Hello @derBoogie

again `me.initializeDatePicker´?!?!

Can you please tell me which version you are using?

Bildschirm­foto 2023-02-23 um 09 52 23

The LitePicker is already in german in events2 8.1.5.

I'm closing that issue. Feel free to re-open that issue, if you have further information for us.

Stefan

derBoogie commented 1 year ago

Hi @sfroemkenjw

the Litepicker looks different on my site:

Screenshot-Events2-Litepicker

And here is a screenshot of the installed Events2 Version (8.1.5) and the Events2.js file with me.initializeDatePicker:

Screenshot-Events2-8 1 5

TJ

sfroemkenjw commented 1 year ago

Hello @derBoogie

now I can confirm your issue. You're using the extbase form to insert new events. I instead use the new EXT:form integration of events2 (configurable in TS constants) where another DatePicker will be used.

Just a note for the developer who will work on that: We can not just apply a hard-coded ISO code to JS. Configure that value with TS:settings is also a bad idea. Maybe we can extract the ISO code from SiteConfiguration and make it available in a data attribute in Template/Layout.

Stefan