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
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.
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.
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...
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.
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.
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?).
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:
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æ—¥ ç«æ›œæ—¥
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:
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æ—¥ ç«æ›œæ—¥
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?
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.....
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.