Hello,
I'm struggling with the localisation of js datepicker on the section competencies of a learning plan, even though my current language is spanish and part of the code on setup.php of datepicker states:
if (in_array(TOTARA_JS_DATEPICKER, $options)) {
$PAGE->requires->js('/totara/core/js/lib/jquery-ui-1.10.4.custom.min.js');
$PAGE->requires->strings_for_js(array('datepickerlongyeardisplayformat', 'datepickerlongyearplaceholder', 'datepickerlongyearregexjs'), 'totara_core');
$PAGE->requires->string_for_js('thisdirection', 'langconfig');
$lang = current_language();
// include datepicker localization file if present for current language
$file = "/totara/core/js/lib/i18n/jquery.ui.datepicker-{$lang}.js";
if (is_readable($CFG->dirroot . $file)) {
$PAGE->requires->js($file);
}
}
Totara is not reading this lang file: $file = "/totara/core/js/lib/i18n/jquery.ui.datepicker-{$lang}.js";
It's still taking all the strings on /totara/core/js/lib/jquery-ui-1.10.4.custom.min.js
Is there somewhere else where i need to check to ensure datepicker is correctly translated to spanish?
I would appreciate your help!
Thanks in advance,
Roger.