5.7 External form with date picker - calendar not translated

Hi folks,

I need to have an external form with a date picker (for the birth date).
The site is in French and German.
Everything works fine (translation done through t('english_string') and the "Translate Site Interface") except the fact the date picker pop-up is not translated (it stays in English) with no way to change it.

I use the following code:
$form = Loader::helper('form');
$dtt = Loader::helper('form/date_time');
echo $dtt->date('a_birthdate', "1/1/2000", true);

which writes:
 <span class="ccm-input-date-wrapper" id="a_birthdate_dw">
  <input id="a_birthdate_pub" class="form-control ccm-input-date hasDatepicker">
  <input id="a_birthdate" name="a_birthdate" type="hidden" value="2000-01-01">
<script type="text/javascript">
$(function () {
  dateFormat: "d\/m\/yy",
  altFormat: "yy-mm-dd",
  altField: "#a_birthdate",
  changeYear: true,
  showAnim: 'fadeIn'
 }).datepicker( "setDate" , new Date(2000, 0, 1) ); });

What is the best way to pass the language parameter?
Thanks in advance for you lights on it!

1 Attachment

View Replies:
A3020 replied on at Permalink Reply
Based on the active language you should include the appropriate localization file. They are located in /concrete/js/i18n/ui.datepicker-**.js.
swissmovie replied on at Permalink Reply
Thanks for the answer!