Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Italian date format
1 2
Lcrimail
Posted on 22 Sep 2009, 20:52:34

Access: Member
Total Posts: 13
Joined: 2009-08-31

I would like to view the DATE in italian format.
What do I have to modify into template news?

Thanks
#880
Chris
Posted on 23 Sep 2009, 02:06:13

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This isn't possible unfortunately. I've added it to the list of things to be implemented in version 3.3

I'n the meantime I'd suggest using only numeric values for the date, 11/11/1111 etc.
#883
Last edited by Chris at 2009-09-23 02:08:38 Reason:
Hhawk
Posted on 03 Mar 2010, 12:48:36

Access: Member
Total Posts: 94
Joined: 2010-03-01

Is it possible to use Dutch dates?

E.g. May > mei?
#1990
Chris
Posted on 03 Mar 2010, 16:25:04

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I never got around to fixing this because it wasn't as straight forward as I thought. A quick way to fix this would be to use a bit of javascript.

In the news templates place the date/time in a div/span element with a unique ID. Then use a bit of javascript to target that element and replace each month with the Dutch translation.
#1999
Hhawk
Posted on 03 Mar 2010, 17:32:14

Access: Member
Total Posts: 94
Joined: 2010-03-01

Okay I will try to find something...
#2005
Hhawk
Posted on 08 Mar 2010, 15:43:12

Access: Member
Total Posts: 94
Joined: 2010-03-01

Okay I had someone taking a shot at the code.

This is what they came up with (2 options):

Code:
  var EN = ['January', 'February', 'March', 'May', 'June', 'July', 'August', 'October'];  var NL = ['Janurai', 'Februari', 'Maart', 'Mei', 'Juni', 'Juli', 'Augustus', 'Oktober'];   function Lang() {    var MonthDiv = document.getElementById('Month');    var MonthTxt = MonthDiv.innerHTML;    for(var i=0; i<8; i++) MonthTxt = MonthTxt.replace(EN[i],NL[i]);    MonthDiv.innerHTML = MonthTxt;  }   window.onload = Lang; 


Code:
  var EN2NL = [];      EN2NL[0] = ['January', 'Janurai'];      EN2NL[1] = ['February', 'Februari'];      EN2NL[2] = ['March', 'Maart'];      EN2NL[4] = ['May', 'Mei'];      EN2NL[5] = ['June', 'Juni'];      EN2NL[6] = ['July', 'Juli'];      EN2NL[7] = ['August', 'Augusti'];      EN2NL[9] = ['October', 'Oktober'];   var d = new Date();  var currMonth = d.getMonth();   function Lang() {    if(EN2NL[currMonth]) {      var MonthDiv = document.getElementById('Month');      var MonthTxt = MonthDiv.innerHTML;      MonthTxt = MonthTxt.replace(EN2NL[currMonth][0],EN2NL[currMonth][1]);      MonthDiv.innerHTML = MonthTxt;    }  }   window.onload = Lang; 


This is great, but I do not understand how I would implent it?
Any help with this?
#2066
Last edited by Hhawk at 2010-03-09 10:16:54 Reason:
Hhawk
Posted on 23 Mar 2010, 13:30:30

Access: Member
Total Posts: 94
Joined: 2010-03-01

* Bump *
#2115
Hhawk
Posted on 26 Mar 2010, 08:30:18

Access: Member
Total Posts: 94
Joined: 2010-03-01

* Bump *
#2128
Hhawk
Posted on 31 Mar 2010, 10:32:42

Access: Member
Total Posts: 94
Joined: 2010-03-01

Chris are you still alive?!
#2175
Chris
Posted on 31 Mar 2010, 14:49:37

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I'll add a new config option to 3.5 that'll let you replace the english days/months with any language you choose. The days/months are already stored in the individual language files so this shouldn't be too difficult to do.
#2180
1 2
Network-13.com © 2013