Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Created March 19, 2015 19:05
Show Gist options
  • Save kjohnson/638276ee6e40c625ed78 to your computer and use it in GitHub Desktop.
Save kjohnson/638276ee6e40c625ed78 to your computer and use it in GitHub Desktop.
Ninja Forms Datepicker Localization German
jQuery(document).ready( function() {
jQuery.datepicker.setDefaults(
{
prevText: '<zurück', prevStatus: '',
prevJumpText: '<<', prevJumpStatus: '',
nextText: 'Vor>', nextStatus: '',
nextJumpText: '>>', nextJumpStatus: '',
currentText: 'heute', currentStatus: '',
todayText: 'heute', todayStatus: '',
clearText: '-', clearStatus: '',
closeText: 'schließen', closeStatus: '',
monthNames: ['Januar','Februar','März','April','Mai','Juni',
'Juli','August','September','Oktober','November','Dezember'],
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
'Jul','Aug','Sep','Okt','Nov','Dez'],
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
showMonthAfterYear: false,
showOn: 'both',
buttonImageOnly: true,
dateFormat:'d MM, y'
}
);
});
<?php
/*
Plugin Name: NF Datepicker German
*/
function nf_datepicker_localize( ) {
wp_enqueue_script(
'nf-datepicker-localize',
plugin_dir_url( __FILE__ ) . 'nf-datepicker-localize.js',
array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ) );
}
add_action( 'ninja_forms_display_js', 'nf_datepicker_localize', 8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment