| 7 locale.module | locale_library_alter(&$libraries, $module) |
Implement hook_library_alter().
Provides the language support for the jQuery UI Date Picker.
File
- modules/
locale/ locale.module, line 953 - Add language handling functionality and enables the translation of the user interface to languages other than English.
Code
function locale_library_alter(&$libraries, $module) {
global $language;
if ($module == 'system' && isset($libraries['system']['ui.datepicker'])) {
$datepicker = drupal_get_path('module', 'locale') . '/locale.datepicker.js';
$libraries['system']['ui.datepicker']['js'][$datepicker] = array('group' => JS_THEME);
$libraries['system']['ui.datepicker']['js'][] = array(
'data' => array(
'jqueryuidatepicker' => array(
'rtl' => $language->direction == LANGUAGE_RTL,
'firstDay' => variable_get('date_first_day', 0),
),
),
'type' => 'setting',
);
}
}
Login or register to post comments