How can I translate DatePicker elements like “Today”, DD / MM / YY”, “Prev” and “Next” ?
Please look on lines 234 and 265-6 of /framework/php/class-form-generator.php
As for the Prev and Next , could you show the page on the theme demo or your website, specifically where they are found?
The date format can be changed with a filter. Use following code and insert it at the bottom of functions.php
return "DD / mm / yy";
Instead of DD/ mm / yy insert your own format. A list of all supported formats can be found here: http://www.phpeveryday.com/articles/ (Purchase code hidden if logged out) -format-for-Datepicker-P1023.html
All other strings (“Prev” and “Next”, Today, etc.) are translatable like standard text strings. I’d recommend to use codestyling: http://wordpress.org/plugins/codestyling-localization/ to scan (or re-scan) the theme files and to add the datepicker text strings to the po/mo files.
Sorry Nick, the theme demo has not datepicker and my website is now on my intranet before publishing. But thank you Dude, I’ve tried codestyling-localization and it works fine, I’ve found the text strings for the datepicker, it’s perfect. I will try the filter for date format.
Thank you to both!
The topic ‘DatePicker translation’ is closed to new replies.