1
ianez
javascript calendar date format localization
  • 2011/4/7 15:34

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


don't know if this is the right place for posting..
This is a sort of bug report and a solution proposal at the same time.

Actually the jscript calendar shows a date in the american format: y-mm-dd
I was not able to find where to change language files for having other format like for example: dd-mm-y
Now I've find a fix that works for me and may be could be inserted in the next to come 2.5.1 release.

A)in include/calendarjs.php changed lines 86/87 from:
Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
Calendar._TT["TT_DATE_FORMAT"] = "y-mm-dd";


to
Calendar._TT["DEF_DATE_FORMAT"] = "<?php echo _CAL_DEF_DATE_FORMAT;?>";
Calendar._TT["TT_DATE_FORMAT"] = "<?php echo _CAL_TT_DATE_FORMAT;?>";


B) in language/[my_language_name]/calendar.php
added in the end two lines
define("_CAL_DEF_DATE_FORMAT""dd-mm-y");
define("_CAL_TT_DATE_FORMAT""dd-mm-y");


this will give a clean localization option to all translators also for jscript calendar, provided that no other solution has been developed

let me know your opinion
Ian

2
Mamba
Re: javascript calendar date format localization
  • 2011/4/18 17:56

  • Mamba

  • Moderator

  • Posts: 11367

  • Since: 2004/4/23


Hmm, unless it is overwritten somewhere else to a local date format, then you're right - it shouldn't be "hard-coded" there.

Can you enter it on SourceForge as a bug, with a link to this message, so we can keep track of this suggestion?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
ianez
Re: javascript calendar date format localization
  • 2011/4/18 18:12

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


done
https://sourceforge.net/tracker/?func=detail&aid=3288975&group_id=41586&atid=430840

4
ForMusS
Re: javascript calendar date format localization
  • 2011/9/13 20:56

  • ForMusS

  • Core Developer

  • Posts: 146

  • Since: 2007/10/19


Hello,

Fixed in SVN and waiting for review
Thanks for your report

Nicolas

Login

Who's Online

138 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 138


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits