Author |
Topic |
inworg
Junior Member
Italy
153 Posts |
Posted - 19 May 2002 : 11:58:47
|
In the while we wait that Snitz Team release a new version of the forum, u can modify a bit your code to show mothnames in your lang as follow:
In files Langxxx.ASP add, translating where need, the following strings:
quote:
strLangMonthName0001 = "January" strLangMonthName0002 = "February" strLangMonthName0003 = "March" strLangMonthName0004 = "April" strLangMonthName0005 = "May" strLangMonthName0006 = "June" strLangMonthName0007 = "July" strLangMonthName0008 = "August" strLangMonthName0009 = "September" strLangMonthName0010 = "October" strLangMonthName0011 = "November" strLangMonthName0012 = "December"
strLangMonthNameShort0001 = "Gen" strLangMonthNameShort0002 = "Feb" strLangMonthNameShort0003 = "Mar" strLangMonthNameShort0004 = "Apr" strLangMonthNameShort0005 = "May" strLangMonthNameShort0006 = "Jun" strLangMonthNameShort0007 = "Jul" strLangMonthNameShort0008 = "Aug" strLangMonthNameShort0009 = "Sep" strLangMonthNameShort0010 = "Oct" strLangMonthNameShort0011 = "Nov" strLangMonthNameShort0012 = "Dic"
In file inc_functios.asp find "function chkDateTime(fDateTime) " and "function chkDate(fDate)" and replace VB function "MonthName" with "intMonthname" (I choosed this name to be clear that means "internationalized monthname").
Add the following function:
quote: function IntMonthName(WhichMonth, Mode) if Mode=0 then Prefix="" else Prefix="Short" end if IntMonthName=eval("strLangMonthName" & Prefix & "00" & WhichMonth) End function
-------------------- Download available at http://www.inworg.com/monthnames.zip --------------------
Regards
Edited by - inworg on 19 May 2002 13:00:33< |
|
Deleted
deleted
4116 Posts |
Posted - 19 May 2002 : 13:46:48
|
Thank you for posting this. As all of you know, v4b3 does not played with the base code, so you stick on short & numbered dates if you have trouble.
On the other hand, the above code will only work on IIS 5.x (i.e. on W2K or XP servers). This is because the eval function is used. To remedy this you can use the following:
function IntMonthName(WhichMonth, Mode) if Mode=0 then select case WhichMonth case "01" IntMonthName = strLangMonthName0001 case "02" IntMonthName = strLangMonthName0002 ... end select else select case WhichMonth case "01" IntMonthName = strLangMonthNameShort0001 case "02" IntMonthName = strLangMonthNameShort0002 ... end select end if End function
Note that the first parameter is "01","02",..,"12" and the second one is either 0 or anything.
An additional note: Also int in the prefix is used for "integer" usually. A better name that fits to Snitz naming could be fLangMonthName.
The same functionality is already included into v4b4, although it uses complete different ideas & flexibility.
Think Pink ==> Start Internationalization Here< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 19 May 2002 : 13:53:50
|
quote: This is because the eval function is used
....I'm using PWS on WIN98 SE..... uhm.... maybe I've updated Scripting Engine and I forgot it....
hehehehehhe....
Regards
< |
|
|
Deleted
deleted
4116 Posts |
Posted - 19 May 2002 : 14:21:44
|
quote:
quote: This is because the eval function is used
....I'm using PWS on WIN98 SE..... uhm.... maybe I've updated Scripting Engine and I forgot it....
hehehehehhe....
Regards
It is also updated with IE versions (only valid for PWS & client side code).
Think Pink ==> Start Internationalization Here< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 19 May 2002 : 14:51:58
|
Following Bozden suggestions I've updated download changing function name and inserting do...case instead "eval"
Tnx Bozden
Regards
-------------------- Download available at http://www.inworg.com/monthnames.zip --------------------
< |
|
|
n/a
deleted
593 Posts |
Posted - 20 May 2002 : 05:44:47
|
Hi, this is nice. But some question: These strings in your lang1033.asp - do they need also to be in other langXXXX.asp with appropriate language translation? Or additing different lang versions of these strings into 1033? I know this is some basic question but appreciate if you can clarify.
LEORAT i2AsiaFORUM < |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 20 May 2002 : 07:17:37
|
U've to add translated strings in each file Langxxxx that u use.
Regards
< |
|
|
n/a
deleted
593 Posts |
Posted - 20 May 2002 : 07:32:35
|
quote:
U've to add translated strings in each file Langxxxx that u use.
Regards
Thanks. That's cool.
BTW, I created a Lang1041 with the Months/Date strings added and translated. Uploaded along with 1033, and other langs (which are in English in both source and target lang strings as not translated yet). Stupid question but where will this month/date show up in different languages, I wonder? I didn't see anything specially changed. Any advise on this?
I had to make inc_functions.asp changed to contain ActiveUsers MOD codes (which I just installed yesterday with Japanese)...Overall forum seems to be functional, but again, not sure where month/date changes should be showing...
Thanks
LEORAT i2AsiaFORUM
Edited by - LeoRat on 20 May 2002 09:39:22< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 20 May 2002 : 11:40:29
|
If u've already changed your inc_functions.asp, simply login in your forum as administrator, Select "Admin Options" -> "Server date/time configuration" -> "date display" and select "31 dec 2000 (Uk med)" or something other type of date that shows monthnames. Try to change your lang and it will change monthnames too.... that's all.
U can see my forum "patched" at http://www.inworg.com/public/ita/demo/Snitz40/
If u don't have modified your inc_functions.asp as showed in my previous posts, u can simply download the patch (link in my posts) and follow this steps:
· Find and replace in your file the functions chkDateTime(fDateTime) and chkDate(fDate) with the ones that u can find in my inc_functions.asp file; · find in my file inc_functions.asp the function fLangMonthName and copy it at the end of your file. · Apply the changes in in the control panel as showed above.
That's all.
Keep always a backup of your files!!!!! Bye
< |
|
|
n/a
deleted
593 Posts |
Posted - 20 May 2002 : 16:50:17
|
Hi, thanks. I have installed your inc_functions.asp and modified it to be compatible with ActiveUsers4.05 which was installed previously w/JA. It seems working fine, functionally.... so to speak. JA expressions for yyyy/mm/dd, mm/dd/yyyy, mm dd, yyyy, etc are not showing up correctly. Japanese uses 1st month, 2nd month,etc. expressions for months and for example, May become 5 and "month". Also 20 become, 20 "Day", and 2002 becomes 2002"Year"...It is only showing "Month" in Date Expression. Not sure how this will be changed to proper expression...All JA chars for Year, Month, Day are in Lang1041 as well....
Short expressions with yyyy/mm/dd or yyyy/mm/dd are fine...and probably better to keep it that way. (or wait for V4.04 for full support for various international date expressions?).
LEORAT i2AsiaFORUM < |
|
|
Deleted
deleted
4116 Posts |
Posted - 20 May 2002 : 17:13:49
|
These are the supported Japanese long date formats in v4b04 (result from the alpha version, use utf-8 to see this), using the translation you sent me in add-on:
2002å¹´5月20æ—¥ 2002å¹´05月20æ—¥ 2002å¹´5月21æ—¥ ç«æ›œæ—¥ 2002å¹´05月21æ—¥ ç«æ›œæ—¥
Hmmm. there is a problem here with the others: gg yå¹´5月21æ—¥ gg yå¹´5月21æ—¥ ç«æ›œæ—¥ yå¹´5月21æ—¥ yå¹´5月21æ—¥ ç«æ›œæ—¥ gg 02å¹´05月21æ—¥ gg 02å¹´05月21æ—¥ ç«æ›œæ—¥
Taku, what are these gg and y?
Think Pink ==> Start Internationalization Here< |
|
|
Deleted
deleted
4116 Posts |
Posted - 20 May 2002 : 17:17:09
|
The above ones were for long date format. The following are short date format:
2002/05/21 02/05/21 02/5/21 2002/5/21 02/05/21 (ç«æ›œ) 02/5/21 (ç«æ›œ) 2002/05/21 (ç«æ›œ) 2002-05-21
Again the same problem: gg y/5/21 gg y/5/21 (ç«æ›œ)
Taku, do these look OK?
Think Pink ==> Start Internationalization Here< |
|
|
n/a
deleted
593 Posts |
Posted - 20 May 2002 : 17:26:44
|
quote:
These are the supported Japanese long date formats in v4b04 (result from the alpha version, use utf-8 to see this), using the translation you sent me in add-on:
2002å¹´5月20æ—¥ 2002å¹´05月20æ—¥ 2002å¹´5月21æ—¥ ç«æ›œæ—¥ 2002å¹´05月21æ—¥ ç«æ›œæ—¥
Hmmm. there is a problem here with the others: gg yå¹´5月21æ—¥ gg yå¹´5月21æ—¥ ç«æ›œæ—¥ yå¹´5月21æ—¥ yå¹´5月21æ—¥ ç«æ›œæ—¥ gg 02å¹´05月21æ—¥ gg 02å¹´05月21æ—¥ ç«æ›œæ—¥
Taku, what are these gg and y?
Think Pink ==> Start Internationalization Here
Gee, gg y stuff must be for 20...somehow gabbled (?)... is this some encoding error for chars in utf-8? Am not sure, since it shows up OK in both utf-8 and Shift-JIS version, if these are generated out of LANG1041.... Others look fine.
Why top group renders fine and the bottom not...some of them are the same expressions?
Strange.
LEORAT i2AsiaFORUM
Edited by - LeoRat on 20 May 2002 17:35:49< |
|
|
n/a
deleted
593 Posts |
Posted - 20 May 2002 : 17:32:52
|
quote:
The above ones were for long date format. The following are short date format:
2002/05/21 02/05/21 02/5/21 2002/5/21 02/05/21 (ç«æ›œ) 02/5/21 (ç«æ›œ) 2002/05/21 (ç«æ›œ) 2002-05-21
Again the same problem: gg y/5/21 gg y/5/21 (ç«æ›œ)
Taku, do these look OK?
Think Pink ==> Start Internationalization Here
Yeah, the same problem with gg y - these must be for 2002.... Are these from your utf-8 format questionaire items for Month/WeekDay long/short expressions?
Don't know why this is so.
By any chance 02 cannot be processed correctly? Seems like gg is for 20 and _ y is for 02?????
I used MS IME Japanese input editor...for generating Japanese. But never thad this problem before with LANG1041.....
?????
LEORAT i2AsiaFORUM
Edited by - LeoRat on 20 May 2002 17:40:56
Edited by - LeoRat on 20 May 2002 17:46:53< |
|
|
Deleted
deleted
4116 Posts |
Posted - 20 May 2002 : 17:44:44
|
quote:
Gee, gg y stuff must be for 20...somehow gabbled (?)... is this some encoding error for chars in utf-8? Am not sure, since it shows up OK in both utf-8 and Shift-JIS version, if these are generated out of LANG1041.... Others look fine.
No the gg & y are from the string which indicate the format from nlsweb. They get replaced with whatever they mean. The original string was for example
gg y'年'M'月'd'日' dddd
the dddd, d, M got replaced, but these are left because I don't know whatever they mean. "y" must be a part of year, no idea on "gg" thou. Can it be other non-usual date coding for quarter, etc?
Have a look at the following and tell me what it is please (got this from global.exe, double quotes are put by me to show where it starts/ends):
For format: "gg y'年'M'月'd'日'" It outputs: " 2年5月21日"
For format: "gg y'å¹´'M'月'd'æ—¥' dddd" It outputs: " 2å¹´5月21æ—¥ ç«æ›œæ—¥"
For "y" it puts "2", either last or first number of year 2002 (bad year for tests ) For "gg" it seems to put nothing, and the space between gg and y is kept.
Strange.
Think Pink ==> Start Internationalization Here< |
|
|
Deleted
deleted
4116 Posts |
Posted - 20 May 2002 : 17:50:06
|
quote:
Again the same problem: gg y/5/21 gg y/5/21 (ç«æ›œ)
From these I can see that "y" is the last digit in year (the other one would be absurd).
Think Pink ==> Start Internationalization Here< |
|
|
Topic |
|