Author |
Topic |
|
nineu
Starting Member
Spain
45 Posts |
Posted - 13 August 2002 : 20:34:15
|
Hi,
I have links manager MOD working in my forum. It works fine but in new links the dates appear in english and I'd like to write in spanish:
• Wednesday, August 14, 2002 (2) -->Miércoles, 14 de Agosto, 2002 • Tuesday, August 13, 2002 (0) • Monday, August 12, 2002 (0) • Sunday, August 11, 2002 (0) • Saturday, August 10, 2002 (0) • Friday, August 09, 2002 (0) • Thursday, August 08, 2002 (0)
Is it possible?
I have the forum in two language (english and spanish) but I think that this MOD doesn't work with dates configuration of forum
Thanks a lot
By |
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 14 August 2002 : 01:23:36
|
hi~ nineu
i also have this problem when using non-english language snitz mod (ex.Events Mod...) and i think if you do a search here, you can find many helpful information about these and solve your problem..(at least, for me usually i can get the answer from this forum..)
below is my Translate Date solution:
- in inc_functions.asp, i've several script to do these stuff. (not i did, just read from others's posts..)
'---------------- Translate to Chinese Date Format ----------------- function ChineseWeekDay(intWeekday,iAbb) ' change below line from Sunday#Monday#...#Saturday to your language, ' and there two format, when iAbb=0 it show the LongDays, iAbb=1 show ShortDays.. myLongDays = "¬P´Á¤é#¬P´Á¤@#¬P´Á¤G#¬P´Á¤T#¬P´Á¥|#¬P´Á¤#¬P´Á¤»" myShortDays = "(¤é)#(¤@)#(¤G)#(¤T)#(¥|)#(¤)#(¤»)" if iAbb = 1 then arrWeekday = Split(myShortDays, "#", -1, 1) ChineseWeekDay= arrWeekday(intWeekday-1) exit function end if if iAbb = 0 then arrWeekday = Split(myLongDays, "#", -1, 1) ChineseWeekDay= arrWeekday(intWeekday-1) exit function end if end function
function ChineseMonth(X) ' change below array.. from Jan. to Dec. in your language... M = Array("¤@¤ë", "¤G¤ë", "¤T¤ë", "¥|¤ë", "¤¤ë", "¤»¤ë", "¤C¤ë", "¤K¤ë", "¤E¤ë", "¤Q¤ë", "¤Q¤@¤ë", "¤Q¤G¤ë") If X >= 1 And X <= 12 Then ChineseMonth = M(X - 1) end function
function ChineseYear(strYear) ' this seem no need, unless you use non-Western year in Spain... Y = Array("¤@¤E¤E¤K", "¤@¤E¤E¤E", "¤G¡³¡³¡³", "¤G¡³¡³¤@", "¤G¡³¡³¤G", "¤G¡³¡³¤T", "¤G¡³¡³¥|", "¤G¡³¡³¤") If strYear >= 1998 And strYear <= 2005 Then ChineseYear = Y(strYear - 1998) end function '------------------------------------------------------------------------------
- then for example, in links_new.asp search where the date show on html page.. change this line <%= formatdatetime(curDate,1) %>
to something like these <%= SpainWeekDay(WeekDay(curDate),0) & ", " & Day(curDate) & " " & SpainMonth(Month(curDate)) & ", " & Year(curDate) %>
hope it helpful for you ~
|
~......~.~~ |
|
|
nineu
Starting Member
Spain
45 Posts |
Posted - 17 August 2002 : 04:36:52
|
Thanks DoraMoon. But I have one problem. I have changed the code (only with my language):
inc_funtions.asp
'################### Translate to Spanish Date Format #####################
function SpainWeekDay(intWeekday,iAbb)
myLongDays = "Domingo#Lunes@Marte#Miércoles#Jueves#Viernes#Sábado"
myShortDays = "Dom#Lun#Mar#Mier#Juev#Vier#Sab"
if iAbb = 1 then arrWeekday = Split(myShortDays, "#", -1, 1) SpainWeekDay= arrWeekday(intWeekday-1) exit function end if
if iAbb = 0 then arrWeekday = Split(myLongDays, "#", -1, 1) SpainWeekDay= arrWeekday(intWeekday-1) exit function end if
end function
function SpainMonth(X)
' change below array.. from Jan. to Dec. in your language... M = Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre") If X >= 1 And X <= 12 Then ChineseMonth = M(X - 1)
end function
links_news-asp
95) <td> <font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"><a href=links_new.asp?daysago=<%=i%>><%= SpainWeekDay(WeekDay(curDate),0) & ", " & Day(curDate) & " " & SpainMonth(Month(curDate)) & ", " & Year(curDate) %></a></font></td>
And it doesn't work
There isn't no problem but when I call to links_new.asp, the page are waiting something at line 95)
Do you konw what's the problem?
Excuse me my english, I'm very bad with this language
Thanks a lot
|
Edited by - nineu on 17 August 2002 05:19:22 |
|
|
nineu
Starting Member
Spain
45 Posts |
Posted - 17 August 2002 : 05:22:59
|
One thing, the code in inc_funtions.asp, where i have to write?
At the end, at the begining? or is it the same.
Thanks |
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 17 August 2002 : 09:45:11
|
hi~~ nineu
i test your code on my forum, there are two small place need to fix..
inc_funtions.asp
function SpainWeekDay(intWeekday,iAbb)
myLongDays = "Domingo#Lunes#Marte#Miércoles#Jueves#Viernes#Sábado" (you need make sure this line have 7 items(begin with "Sun." and end "Sat.") and these weekday names will be seperated by 6 # ) : : : function SpainMonth(X) : If X >= 1 And X <= 12 Then SpainMonth = M(X - 1) '(i think the web page just waiting/down here, we call the "SpainMonth", but wrong direct to "ChineseMonth"...)[/blue]
after these two fix, then it work no problem on my forum..
and about where to insert these new functions in inc_functions.asp.. inc_functions.asp just combine with a lots sections of function(xxx)...end function so you can place these in anywhere, it's no matter, just be sure it between the top <% and bottom %> for example, i put these on about line.600.. just because there are many different function relate to Date or Time...
function chkDateTime(fDateTime) :: end function ::: function StrToDate(strDateTime) :: end function '######### Translate to Spanish Date Format ########### function SpainWeekDay(intWeekday,iAbb) :: :: end function ::::: function chkTime(fTime) :: end function ::::
it really nothing matter, u also can place at top or bottom... but MUST in the asp code close section <%....%>
Please try it again... hope it can work for you~
(p.s. never mind the English... mine also very poor in english..)
|
Edited by - DoraMoon on 17 August 2002 09:51:23 |
|
|
nineu
Starting Member
Spain
45 Posts |
Posted - 27 August 2002 : 09:42:20
|
Thanks DoraMoon:
Now it works perfectly.
Thanks a lot
|
|
|
|
Topic |
|
|
|