Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Internationalization (v4)
 Events calendar translation
 Forum Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 4

LC
New Member

Brazil
70 Posts

Posted - 14 May 2002 :  17:21:53  Show Profile
I want to translate the Month and day names.
Where can I make these changes?
I didn't find May, June... and so on anywhere in the code.
From where the calendar gets the Month and day names?
Thanks,

LC<

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 May 2002 :  17:41:15  Show Profile  Send ruirib a Yahoo! Message
I believe it does it from the MonthName function. For that fact translation should not be needed, as long as you have Windows Regional Settings to your local country settings.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 14 May 2002 :  18:08:00  Show Profile
Ok thanx.

LC



Edited by - LC on 14 May 2002 18:33:12<
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 14 May 2002 :  18:27:19  Show Profile
add this function at the very end of your events_functions.asp file. then change all the occurances of monthName to MonthName2

note: below is a turkish version, you may change the names accordingly.

'------------------------------------
'MONTH 2 FUNCTION - Türkçe
'------------------------------------

function monthName2(intMonth)
if (intMonth = 1) then monthName2 = "Ocak"
if (intMonth = 2) then monthName2 = "Şubat"
if (intMonth = 3) then monthName2 = "Mart"
if (intMonth = 4) then monthName2 = "Nisan"
if (intMonth = 5) then monthName2 = "Mayıs"
if (intMonth = 6) then monthName2 = "Haziran"
if (intMonth = 7) then monthName2 = "Temmuz"
if (intMonth = 8) then monthName2 = "Ağustos"
if (intMonth = 9) then monthName2 = "Eylül"
if (intMonth = 10) then monthName2 = "Ekim"
if (intMonth = 11) then monthName2 = "Kasım"
if (intMonth = 12) then monthName2 = "Aralık"
end function

<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 14 May 2002 :  18:29:43  Show Profile
Thank you!

LC

<
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 14 May 2002 :  18:35:14  Show Profile
The next beta version (v4b04) will handle this case, but in a different way (in current implementation).


Think Pink
==> Start Internationalization Here<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 May 2002 :  18:50:26  Show Profile  Send ruirib a Yahoo! Message
Sorry LC. As far as I know MonthName should work OK with your Regional Settings. It seems that it doesn't (just tested it and it failed), so that function by blackinwhite should fix it for you.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
<
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 14 May 2002 :  18:58:51  Show Profile
quote:

Sorry LC. As far as I know MonthName should work OK with your Regional Settings. It seems that it doesn't (just tested it and it failed), so that function by blackinwhite should fix it for you.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs




This is only if you select servers locale correctly. Most people have no access to these servers and these servers are somewhere on the world (mostly US).


Think Pink
==> Start Internationalization Here<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 May 2002 :  19:48:28  Show Profile  Send ruirib a Yahoo! Message
In fact Bozden, all you need to do to have it working is changing the value of Session.LCID to your locale ID. No need to change server settings.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
<
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 14 May 2002 :  20:10:19  Show Profile
quote:

In fact Bozden, all you need to do to have it working is changing the value of Session.LCID to your locale ID. No need to change server settings.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs




Yes and no. There are a lot of cases that this line gives an error because the server does not support it. Just search for it in these forums.

The problem is, I cannot base v4 on any assumptions, so I think the other way and forget easier solutions .


Think Pink
==> Start Internationalization Here<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 14 May 2002 :  23:55:19  Show Profile
quote:

quote:

Sorry LC. As far as I know MonthName should work OK with your Regional Settings. It seems that it doesn't (just tested it and it failed), so that function by blackinwhite should fix it for you.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs



That's ok.
I'm gonna make those changes and see what happens.

LC
This is only if you select servers locale correctly. Most people have no access to these servers and these servers are somewhere on the world (mostly US).


Think Pink
==> Start Internationalization Here



<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 15 May 2002 :  00:30:45  Show Profile
Hi there.
It's me again...
What about the date?
How do I change it from the default US style (5/15/2002) to our way (15/05/2002)?
I tried the fix events_non_us_date by Rami Kattan, but didn't work.
I'm currently using the SnitzwBugFixesHideEmail.

LC

PS. Here's the fix's readme.txt:
Title: Snitz Events Calendar
Midified Files depending on Ver 2 service release 1

mod: Non US date format is SUPPORTED in this version

to fix the US date error in the forum:

1- use the attached events_functions.asp file.

2- in the "inc_functions.asp" file, look for:
function StrToDate(strDateTime)
....
end function

and replace it with this code:

function StrToDate(strDateTime)
if ChkDateFormat(strDateTime) then
StrToDate = cdate("" & MonthName(cint(Mid(strDateTime, 5,2))) & " " & Mid(strDateTime, 7,2) & ", " & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
else
StrToDate = "" & strForumTimeAdjust
end if
end function

this fix is supposed to work on all, as dates are not used as mm/dd/yyyy or dd/mm/yy, the update makes the dated monthname dd, yyyy (ex Arpil 12, 2001).

Hope this works for all, i am using dd/mm/yyyy and it works well for me.

Rami Kattan
http://www.kattanweb.com/forums



Edited by - LC on 15 May 2002 00:33:17<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 15 May 2002 :  00:58:34  Show Profile
quote:

add this function at the very end of your events_functions.asp file. then change all the occurances of monthName to MonthName2

note: below is a turkish version, you may change the names accordingly.

'------------------------------------
'MONTH 2 FUNCTION - Türkçe
'------------------------------------

function monthName2(intMonth)
if (intMonth = 1) then monthName2 = "Ocak"
if (intMonth = 2) then monthName2 = "Şubat"
if (intMonth = 3) then monthName2 = "Mart"
if (intMonth = 4) then monthName2 = "Nisan"
if (intMonth = 5) then monthName2 = "Mayıs"
if (intMonth = 6) then monthName2 = "Haziran"
if (intMonth = 7) then monthName2 = "Temmuz"
if (intMonth = 8) then monthName2 = "Ağustos"
if (intMonth = 9) then monthName2 = "Eylül"
if (intMonth = 10) then monthName2 = "Ekim"
if (intMonth = 11) then monthName2 = "Kasım"
if (intMonth = 12) then monthName2 = "Aralık"
end function





Tried ur sugestion. Here's where I put the function:

rs.movenext
loop
end if
%>
</table>
</td>
</tr>
</table>
<%
rs.Close

'move to the next day
dCurrentDate = DateAdd("D",counter,dSunday)
next

set rs = nothing
%>
</td>
</tr>
</table>
<%
end function
%>
<%
'------------------------------------
'MONTH 2 FUNCTION - Português
'------------------------------------

function monthName2(intMonth)
if (intMonth = 1) then monthName2 = "Janeiro"
if (intMonth = 2) then monthName2 = "Fevereiro"
if (intMonth = 3) then monthName2 = "Março"
if (intMonth = 4) then monthName2 = "Abril"
if (intMonth = 5) then monthName2 = "Maio"
if (intMonth = 6) then monthName2 = "Junho"
if (intMonth = 7) then monthName2 = "Julho"
if (intMonth = 8) then monthName2 = "Agosto"
if (intMonth = 9) then monthName2 = "Setembro"
if (intMonth = 10) then monthName2 = "Outubro"
if (intMonth = 11) then monthName2 = "Novembro"
if (intMonth = 12) then monthName2 = "Dezembro"
end function
%>
----------------------end of page-----------------------
And I get this error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cdate'

/forum/events_functions.asp, line 11


Line 11 is this:


Function GetLastDay(intMonthNum, intYearNum)
Dim dNextStart
If CInt(intMonthNum) = 12 Then
dNextStart = CDate( "01/01/" & intYearNum)
Else
"Line 11" --> dNextStart = CDate(MonthName2(intMonthNum + 1) & " 1," & intYearNum)
End If
GetLastDay = Day(dNextStart - 1)
End Function

LC
<
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 15 May 2002 :  19:34:33  Show Profile
LC, maybe you are using an older version of Events Calndar, or you have changed some parts of the file.

my file doesn't inlude that function (at least not like that).

instead, I have

Function GetLastDay(intMonthNum, intYearNum)
Dim dNextStart
If CInt(intMonthNum) = 12 Then
dNextStart = CDate(strToDate(intYearNum & "0101" & "000000"))
Else
dNextStart = CDate(strToDate(intYearNum & doublenum(intMonthNum + 1) & "01" & "000000"))
End If
GetLastDay = Day(dNextStart - 1)
End Function


as you see there are no references to monthName in that. (you shouldn't change inthMonthName, but just MonthName) bump bump

and changing the date format from month/day/year to day/month/year is also possible with some modifications.

In Huwr's code, that is already integrated with forum dates, I think.

For the original, Events Calendar mod, I have formerly changed my Events Functions file, but all the messages are in Turkish, if you want I can send it to you with the modifications I made.

blackinwhite

<
Go to Top of Page

LC
New Member

Brazil
70 Posts

Posted - 16 May 2002 :  01:15:42  Show Profile
Yes, thank you!
I'd appreciate that.
And BTW I'm using "eventsV2sr1"

LC<
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 16 May 2002 :  05:51:41  Show Profile
I have sent you my previous files.

there is aslo a patch for strtodate function.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=25969

that also solves some of the problems with non-US dates (especially in HuwR's version)

<
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Next Page
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07