apeisa Posted September 19, 2013 Share Posted September 19, 2013 It's easy to translate jquery ui datepicker (change url to translation file from language pack), but is the same possible for timepicker addon? Link to comment Share on other sites More sharing options...
ryan Posted September 22, 2013 Share Posted September 22, 2013 I haven't taken a close look at it yet, but there is some info about localization for this timepicker on this page: http://trentrichardson.com/examples/timepicker/ Link to comment Share on other sites More sharing options...
gebeer Posted December 12, 2013 Share Posted December 12, 2013 It's easy to translate jquery ui datepicker (change url to translation file from language pack), but is the same possible for timepicker addon? Sounds easy. But for a PW newb like me, how would I go about changing that URL? Talking about datepicker in frontend form built with fabulous FormBuilder module. Cheers gerhard Link to comment Share on other sites More sharing options...
teppo Posted December 15, 2013 Share Posted December 15, 2013 @gebeer: you need to translate /wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module file via Setup > Languages, i.e. the built-in multi-language support. Once you start translating that file, insert the datepicker translation file you wish to use into the first input titled "Datepicker translation file." You can see a list of available translation files here: https://github.com/ryancramerdesign/ProcessWire/tree/master/wire/modules/Jquery/JqueryUI/i18n. To get german translations, you'd insert "/wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-de.js" etc. 2 Link to comment Share on other sites More sharing options...
teppo Posted December 15, 2013 Share Posted December 15, 2013 @ryan: timepicker seems to support translation system identical to datepicker. Is there a chance that you could somehow include it's i18n files (in jQuery UI i18n directory or with the inputfield module itself) and ability to load selected one (perhaps in same way as with datepicker) at some point? Link to comment Share on other sites More sharing options...
gebeer Posted December 15, 2013 Share Posted December 15, 2013 @teppo thank you. I knew that it would be quite easy. Link to comment Share on other sites More sharing options...
ryan Posted December 27, 2013 Share Posted December 27, 2013 @ryan: timepicker seems to support translation system identical to datepicker. Is there a chance that you could somehow include it's i18n files (in jQuery UI i18n directory or with the inputfield module itself) and ability to load selected one (perhaps in same way as with datepicker) at some point? Yes, I'd be happy to do this. I didn't realize it was that simple. I've got some other things on the to-do list first, so if anyone gets to it before I do feel free to send over the files and I'll add them when I get back in the office next week. Link to comment Share on other sites More sharing options...
kixe Posted April 20, 2015 Share Posted April 20, 2015 (edited) Translation Problems Path of 'Datepicker translation file' is set in translation file (json) of inputfield DateTime. File (/wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-de.js) exist and is accesible. cache cleaned Datepicker still uses default regional settings Need help, any ideas?# Edit 23.04.2015Problem solved, edited jquery translation by adding timepicker regional settings. (/wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-de.js). Example below (german) /* German initialisation for the jQuery UI date picker plugin. */ /* Written by Milian Wolff (mail@milianw.de). */ /* edited by kixe: timepicker settings added 23.04.2015 */ jQuery(function($){ $.datepicker.regional['de'] = { closeText: 'schließen', prevText: '<zurück', nextText: 'Vor>', currentText: 'heute', monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], weekHeader: 'KW', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''}; $.datepicker.setDefaults($.datepicker.regional['de']); $.timepicker.regional['de'] = { timeText: 'Uhrzeit', hourText: 'Stunde', minuteText: 'Мinute', secondText: 'Sekunde', millisecText: 'Millisekunde', timezoneText: 'Zeitzone', currentText: 'jetzt', closeText: 'schließen', timeFormat: 'HH:mm', isRTL: false }; $.timepicker.setDefaults($.timepicker.regional['de']); }); Edited April 23, 2015 by kixe 1 Link to comment Share on other sites More sharing options...
bernhard Posted June 11, 2020 Share Posted June 11, 2020 Seems that things changed slightly ? This worked for me today: Translate file /wire/modules/Inputfield/InputfieldDatetime/types/InputfieldDatetimeText.php Set path: /wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-de.js Search keys: datetime, date picker, monday, translate, sunday, german 7 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now