PluginProbe
Timed Content / 2.12
Timed Content v2.12
2.99 trunk 1.0 1.1 1.2 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.10 2.11 2.12 2.15 2.2 2.3 2.3.1 2.4 2.5 2.5.1 2.50 2.51 2.52 All 67 releases
timed-content / lib / jquery-ui-datetime-i18n.php

jquery-ui-datetime-i18n.php in Timed Content 2.12, at lib/jquery-ui-datetime-i18n.php

87 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 global $wp_locale;
3
4 if (!function_exists("ca_aliencyborg_strip_array_indices")) {
5 function ca_aliencyborg_strip_array_indices($ArrayToStrip)
6 {
7 foreach ($ArrayToStrip as $objArrayItem) {
8 $NewArray[] = $objArrayItem;
9 }
10
11 return $NewArray;
12 }
13 }
14
15 if (!function_exists("ca_aliencyborg_date_format_php_to_js")) {
16 function ca_aliencyborg_date_format_php_to_js($sFormat)
17 {
18 switch ($sFormat) {
19 //Predefined WP date formats
20 case 'F j, Y':
21 return ('MM dd, yy');
22 break;
23 case 'Y/m/d':
24 return ('yy/mm/dd');
25 break;
26 case 'm/d/Y':
27 return ('mm/dd/yy');
28 break;
29 case 'd/m/Y':
30 return ('dd/mm/yy');
31 break;
32 default: return $sFormat;
33 }
34 }
35 }
36
37 if ( !isset( $jquery_ui_datetime_datepicker_i18n ) )
38 $jquery_ui_datetime_datepicker_i18n = array(
39 "closeText" => _x( "Done", "jQuery UI Datepicker Close label", "timed-content" ), // Display text for close link
40 "prevText" => _x( "Prev", "jQuery UI Datepicker Previous label", "timed-content" ), // Display text for previous month link
41 "nextText" => _x( "Next", "jQuery UI Datepicker Next label", "timed-content" ), // Display text for next month link
42 "currentText" => _x( "Today", "jQuery UI Datepicker Today label", "timed-content" ), // Display text for current month link
43 "weekHeader" => _x( "Wk", "jQuery UI Datepicker Week label", "timed-content" ), // Column header for week of the year
44 // Replace the text indices for the following arrays with 0-based arrays
45 "monthNames" => ca_aliencyborg_strip_array_indices( $wp_locale->month ), // Names of months for drop-down and formatting
46 "monthNamesShort" => ca_aliencyborg_strip_array_indices( $wp_locale->month_abbrev ), // For formatting
47 "dayNames" => ca_aliencyborg_strip_array_indices( $wp_locale->weekday ), // For formatting
48 "dayNamesShort" => ca_aliencyborg_strip_array_indices( $wp_locale->weekday_abbrev ), // For formatting
49 "dayNamesMin" => ca_aliencyborg_strip_array_indices( $wp_locale->weekday_initial ), // Column headings for days starting at Sunday
50 "dateFormat" => ca_aliencyborg_date_format_php_to_js( get_option( 'date_format' ) ),
51 "firstDay" => get_option( 'start_of_week' ),
52 "isRTL" => $wp_locale->is_rtl(),
53 "showMonthAfterYear" => false, // True if the year select precedes month, false for month then year
54 "yearSuffix" => '' // Additional text to append to the year in the month headers
55 );
56 $tf = get_option( 'time_format' );
57 if ( false !== strpos( $tf, "A") ) {
58 $meridiem = array($wp_locale->meridiem['AM'], $wp_locale->meridiem['PM']);
59 $show_period = true;
60 $show_period_labels = true;
61 $show_leading_zero = false;
62 } elseif ( false !== strpos( $tf, "a") ) {
63 $meridiem = array($wp_locale->meridiem['am'], $wp_locale->meridiem['pm']);
64 $show_period = true;
65 $show_period_labels = true;
66 $show_leading_zero = false;
67 } else {
68 $meridiem = array('', '');
69 $show_period = false;
70 $show_period_labels = false;
71 $show_leading_zero = true;
72 }
73
74 if ( !isset( $jquery_ui_datetime_timepicker_i18n ) )
75 $jquery_ui_datetime_timepicker_i18n = array(
76 "hourText" => _x( "Hour", "jQuery UI Timepicker 'Hour' label", "timed-content" ),
77 "minuteText" => _x( "Minute", "jQuery UI Timepicker 'Minute' label", "content-protector" ),
78 "timeSeparator" => _x( ":", "jQuery UI Datepicker: Character used to separate hours and minutes in translated language", 'timed-content' ),
79 "closeButtonText" => _x( "Done", "jQuery UI Timepicker 'Done' label", "timed-content" ),
80 "nowButtonText" => _x( "Now", "jQuery UI Timepicker 'Now' label", "timed-content" ),
81 "deselectButtonText" => _x( "Deselect", "jQuery UI Timepicker 'Deselect' label", "timed-content" ),
82 "amPmText" => $meridiem,
83 "showPeriod" => $show_period,
84 "showPeriodLabels" => $show_period_labels,
85 "showLeadingZero" => $show_leading_zero );
86
87 ?>