Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
366a52b7
Commit
366a52b7
authored
Apr 29, 2010
by
webchick
Browse files
#507502
by Rob Loach, marvil07: Provide Locale support for jQuery UI.
parent
6a208f85
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/locale/locale.datepicker.js
0 → 100644
View file @
366a52b7
// $Id$
(
function
(
$
)
{
$
.
datepicker
.
regional
[
'
drupal-locale
'
]
=
{
closeText
:
Drupal
.
t
(
'
Done
'
),
prevText
:
Drupal
.
t
(
'
Prev
'
),
nextText
:
Drupal
.
t
(
'
Next
'
),
currentText
:
Drupal
.
t
(
'
Today
'
),
monthNames
:
[
Drupal
.
t
(
'
January
'
),
Drupal
.
t
(
'
February
'
),
Drupal
.
t
(
'
March
'
),
Drupal
.
t
(
'
April
'
),
Drupal
.
t
(
'
May
'
),
Drupal
.
t
(
'
June
'
),
Drupal
.
t
(
'
July
'
),
Drupal
.
t
(
'
August
'
),
Drupal
.
t
(
'
September
'
),
Drupal
.
t
(
'
October
'
),
Drupal
.
t
(
'
November
'
),
Drupal
.
t
(
'
December
'
)
],
monthNamesShort
:
[
Drupal
.
t
(
'
Jan
'
),
Drupal
.
t
(
'
Feb
'
),
Drupal
.
t
(
'
Mar
'
),
Drupal
.
t
(
'
Apr
'
),
Drupal
.
t
(
'
May
'
),
Drupal
.
t
(
'
Jun
'
),
Drupal
.
t
(
'
Jul
'
),
Drupal
.
t
(
'
Aug
'
),
Drupal
.
t
(
'
Sep
'
),
Drupal
.
t
(
'
Oct
'
),
Drupal
.
t
(
'
Nov
'
),
Drupal
.
t
(
'
Dec
'
)
],
dayNames
:
[
Drupal
.
t
(
'
Sunday
'
),
Drupal
.
t
(
'
Monday
'
)
Drupal
.
t
(
'
Tuesday
'
)
Drupal
.
t
(
'
Wednesday
'
)
Drupal
.
t
(
'
Thursday
'
)
Drupal
.
t
(
'
Friday
'
)
Drupal
.
t
(
'
Saturday
'
)
],
dayNamesShort
:
[
Drupal
.
t
(
'
Sun
'
)
Drupal
.
t
(
'
Mon
'
)
Drupal
.
t
(
'
Tue
'
)
Drupal
.
t
(
'
Wed
'
)
Drupal
.
t
(
'
Thu
'
)
Drupal
.
t
(
'
Fri
'
)
Drupal
.
t
(
'
Sat
'
)
],
dayNamesMin
:
[
Drupal
.
t
(
'
Su
'
)
Drupal
.
t
(
'
Mo
'
)
Drupal
.
t
(
'
Tu
'
)
Drupal
.
t
(
'
We
'
)
Drupal
.
t
(
'
Th
'
)
Drupal
.
t
(
'
Fr
'
)
Drupal
.
t
(
'
Sa
'
)
],
dateFormat
:
Drupal
.
t
(
'
mm/dd/yy
'
),
firstDay
:
Drupal
.
settings
.
jqueryuidatepicker
.
firstDay
,
isRTL
:
Drupal
.
settings
.
jqueryuidatepicker
.
rtl
};
$
.
datepicker
.
setDefaults
(
$
.
datepicker
.
regional
[
'
drupal-locale
'
]);
})(
jQuery
);
modules/locale/locale.module
View file @
366a52b7
...
...
@@ -892,6 +892,28 @@ function locale_css_alter(&$css) {
}
}
/**
* Implement hook_library_alter().
*
* Provides the language support for the jQuery UI Date Picker.
*/
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
(
'weight'
=>
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'
,
);
}
}
// ---------------------------------------------------------------------------------
// Language switcher block
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment