View Single Post
Staro 17.09.2015., 17:55   #1
flajpan
.....
Moj komp
 
flajpan's Avatar
 
Datum registracije: Mar 2004
Lokacija: Zagreb, Centar
Postovi: 1,796
jQuery DatePicker - lokalizacija (hr)?





Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file with the language code appended to the name, e.g., jquery.ui.datepicker-fr.js for French. The desired localization file should be included after the main datepicker code. Each localization file adds its options to the set of available localizations and automatically applies them as defaults for all instances. Localization files can be found at https://github.com/jquery/jquery-ui/tree/master/ui/i18n.

The $.datepicker.regional attribute holds an array of localizations, indexed by language code, with "" referring to the default (English). Each entry is an object with the following attributes: closeText, prevText, nextText, currentText, monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, weekHeader, dateFormat, firstDay, isRTL, showMonthAfterYear, and yearSuffix.

You can restore the default localizations with:
$.datepicker.setDefaults( $.datepicker.regional[ "" ] );

And can then override an individual datepicker for a specific locale:
$( selector ).datepicker( $.datepicker.regional[ "fr" ] );




A ovdje i prijevod:
https://github.com/jquery/jquery-ui/tree/master/ui/i18n

Jedan WP plugin koristi datepicker koji ima dane i format datuma engleske.

Ako mi netko može pojasniti gdje trebam dodati taj prijevod i inicijalizirati ga, bio bih zahvalan
-->
Treba mi datepicker na hrvatskom - a ne znam kako točno "ubaciti" prijevod.
Ovo su upute:




Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file with the language code appended to the name, e.g., jquery.ui.datepicker-fr.js for French. The desired localization file should be included after the main datepicker code. Each localization file adds its options to the set of available localizations and automatically applies them as defaults for all instances. Localization files can be found at https://github.com/jquery/jquery-ui/tree/master/ui/i18n.

The $.datepicker.regional attribute holds an array of localizations, indexed by language code, with "" referring to the default (English). Each entry is an object with the following attributes: closeText, prevText, nextText, currentText, monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, weekHeader, dateFormat, firstDay, isRTL, showMonthAfterYear, and yearSuffix.

You can restore the default localizations with:
$.datepicker.setDefaults( $.datepicker.regional[ "" ] );

And can then override an individual datepicker for a specific locale:
$( selector ).datepicker( $.datepicker.regional[ "fr" ] );




A ovdje i prijevod:
https://github.com/jquery/jquery-ui/tree/master/ui/i18n

Jedan WP plugin koristi datepicker koji ima dane i format datuma engleske.

Ako mi netko može pojasniti gdje trebam dodati taj prijevod i inicijalizirati ga, bio bih zahvalan
flajpan je online   Reply With Quote