Author |
Topic |
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 11:50:12
|
Ok, folks... I'll stop here. No more posts.
I've just readed the threads and I think that: a) I don't speak a good english... I repeat: I apologize b) Using system posted 6 posts up I think don't requires FSO or Server.Execute c) Language files to be included may be uploaded direcly via ftp or various tools given by the hosting provider d) Language files (containig arrays of strings) may be, once created, directly downloaded from an area given by Snitz (as now for MODs) and the EN version directly incuded in the standard distribuition e) I never talk about to create DIRECTLY on server (using FSO) the language file! f) to keep light the ASP processing I suggest to create for each ASP file that contains strings to be displayed, the "mapped" include file as this:
Topic.Asp
TopicEN.Asp TopicTK.Asp TopicIT.Asp TopicSP.Asp
Where 'EN'...'SP' is contained in strLang to be used inside ASP files as follow
<A HREF="Topic<%=strLang%>.Asp">Something</A>
Each of TopicXX.Asp will contain: in body: - an array of strings to be used in the codepage in bottom: <!-- #INCLUDE file="Topic.Asp"-->
or <!-- #INCLUDE Virtual="Topic.Asp"-->
I close here the problem. I'll wait for your final choosed solution.
Edited by - inworg on 17 May 2001 11:54:38< |
|
|
Reinsnitz
Snitz Forums Admin
USA
3545 Posts |
Posted - 17 May 2001 : 12:04:49
|
interesting concept... and I guess it could potentialy be worked to have hte language file use the main forum file as the include... hmmmm.... but how to get them into the right language file in the first place is a problem...
Reinsnitz (Mike) ><)))'> Need a Mod? "Therefore go and make disciples of all nations,..." Matthew 28:19a< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 12:22:50
|
Simple solution: a) If the user is already "cooked"... no problem b) If no Cookies Default.Asp shows a page with flags and the string "Choose your language" in each language and when the user clicks over a flag, javascript sets a cookieLang and reloads, even with logon form. c) If user logs-in direcly (EN Lang) the strLang will be loaded from profile
Edited by - inworg on 17 May 2001 12:38:36< |
|
|
Reinsnitz
Snitz Forums Admin
USA
3545 Posts |
Posted - 17 May 2001 : 12:46:31
|
hmmmm.... we're still posed with the dynamic include problem... without doing a language file for every .asp page that needs to be translated :(
Reinsnitz (Mike) ><)))'> Need a Mod? "Therefore go and make disciples of all nations,..." Matthew 28:19a< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 12:50:46
|
I've no other ideas for now... I still keep thinking Bye
< |
|
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 17 May 2001 : 14:02:55
|
quote:
interesting concept... and I guess it could potentialy be worked to have hte language file use the main forum file as the include... hmmmm.... but how to get them into the right language file in the first place is a problem...
This isn't a bad idea at all. What you COULD do is create a controller file (default.asp would probably be fine, just rename the current default file to board.asp or some such thing like that). What we would need to do is change all calls from "topic.asp?topic_id=..." to "default.asp?file=topic&topic_id=". What the controller file could then do is something like this:
<% dim File, FullQueryString, NeededCookieString File = Request.QueryString("file") FullQueryString = Request.QueryString NeededCookieString = Right(FullQueryString, (Len(FullQueryString) - (InStr(1, FullQueryString, "&"))))
CookieLanguage = Request.Cookies(strUniqueID & "User")("Language")
If CookieLanguage <> "" then File = File & CookieLanguage Else File = File & StrLanguage End if
If NeededCookieString <> "" then File = File & "?" & NeededCookieString End if
Response.Redirect File %>
I really need to start using the preview button on involved posts
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead
Edited by - davemaxwell on 17 May 2001 14:06:58< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 14:33:52
|
The main problem is that we have to choose what "suppress" between: a) Disk Space on Host b) Lower ASP Execution speed caused by bigger code c) Lower ASP Execution speed caused by intensive memory use on server d) Lower ASP Execution speed caused by intensive use of Disk e) Complexity of new sofware
... so let me show another idea ....
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 15:08:48
|
IDEA #2: CACHED DATABASE ...isn't over until it's over...
This idea borns by the thing that the better solution to keep language strings is inside an array, and inside ASP using something like this <%=strLang(WordsIndexItem)%>
Keeping in mind what wrote above, we can use an alternative to the system in previous topics.
We can create a new table like this: Cacheable (T/F) KeyStr (String) WordsArray (Memo)
where: - KeyStr is composed by LangID ('EN', 'TK', or 'IT') plus ScriptName ('Topics.Asp','Default.Asp', and so on...) so we have something like this: 'ENTopics.Asp' , 'TKDefault.Asp', 'ITForum.Asp' as Key Search - WordsArray Inside this we have an array of sentences pipe-separated (like 'bad words' system) so we can retrive the N-Indexed sentence from the record of database "Joined" with Choosed Language and ASP-Script filename
Someone may think that this search applied X-times per minute may keep slowly the Server... right! But what happens if we "Cache" inside the Application(KeyStr) the value of WordsArray ? This system seems to "Overload" server memory... but it doesen't if we pay attention to delete every N minutes the unused arrays (we can use a routine inside the most used page to do this) and NOT storing in Application the records with the Cache-fields setted False (eg. for most unused languages, forcing the server to read each time the value from database).
To do all this above we have to: a) before search the record, check if Application(KeyStr) is <> "" b) if not use this, else load it from disk c) store the value in a varible to speed-up code execution (access to Application and Session is slowly) d) if is Cacheable, store it in memory e) delete all Application strings timed-out
To keep in memory the date/time when an Application is created we can assume that, storing it in YYYYMMDDhhmmss, the first (or last) 14 chars are reserved and so NOT stored in the local variable to use as strLang
Waiting... for your posts.... Regards
P.S. To do this we can also use the Dictionary object....
Edited by - inworg on 17 May 2001 15:13:04< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 18 May 2001 : 03:06:54
|
Surfing in forum I've just readed this topic http://forum.snitz.com/forum/topic.asp?whichpage=2&Forum_Title=Announcements%3A DEV Group&Topic_Title=For Development to Continue%2E%2E%2E I need help%2Finput%2E%2E&CAT_ID=6&FORUM_ID=3&TOPIC_ID=9447
Sorry, Dave ... my idea is not an "hacking" of a yours! I've found the above topic AFTER I posted mine...
I think that this is, for now, the better way to internationalization.
< |
|
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 18 May 2001 : 07:40:49
|
quote:
Sorry, Dave ... my idea is not an "hacking" of a yours! I've found the above topic AFTER I posted mine...
Doesn't bother me one way or the other, since I'm just shooting out ideas. It probably would be good to close one of these two discussions since I know I'm getting confused (I know, not hard to do....)
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 18 May 2001 : 07:51:58
|
Ok... I think too is better for all to merge these topics...
< |
|
|
Deleted
deleted
4116 Posts |
Posted - 18 May 2001 : 09:18:39
|
Actually the other topic was about "how to implement dynamic includes?", but it turned out to be again a "how to do internationalization". I just read both of them :) Well this way or the other... We can discuss further 'cause I'm still waiting for the up2date files to start conversion.
Cheers
Bulent Ozden History Foundation of Turkey
Edited by - bozden on 20 April 2002 09:29:10< |
|
|
Morpheus73
Average Member
Denmark
597 Posts |
|
Deleted
deleted
4116 Posts |
|
inworg
Junior Member
Italy
153 Posts |
Posted - 19 May 2001 : 10:42:23
|
I think that Global.asa-dependant system is good only for domains hosting only this forum. What about if I host more forums or the forum isn't the main part (homepage) of my site?
< |
|
|
Topic |
|