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)
 !!! PLEASE READ - INTERNATIONAL VERSION !!!
 Forum Locked  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

Deleted
deleted

4116 Posts

Posted - 16 May 2001 :  13:29:09  Show Profile
quote:

NOT ALL SERVERS ALLOW SSI !!



The #INCLUDE directive is supported by ASP, not the others (echo, config, fsize, etc). So if a server supports ASP (a must for Snitz) then the #INCLUDE must be supported. Am I wrong?

Bulent Ozden
History Foundation of Turkey


Edited by - bozden on 20 April 2002 09:23:56<
Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 17 May 2001 :  04:08:42  Show Profile
Snitz uses many includes, so if it works on a server, that server supports includes. I don't think any would support ASP and don't allow you to do SSI.

Regards,
Paco

<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  04:11:43  Show Profile  Visit inworg's Homepage
#INCLUDE directive is only a type of SSI.
The complete set of SSI comands allows conditional includes. #INCLUDE directive in ASP as follow

if x=1 then
#INCLUDE A.INC
elseif X=2 then
#INCLUDE B.INC
else
#INCLUDE C.INC
end if

even include A.INC, B.INC, C.INC so the code get big and slowly.

<
Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 17 May 2001 :  05:14:35  Show Profile
quote:
... The complete set of SSI comands allows conditional includes...

if x=1 then
#INCLUDE A.INC
elseif X=2 then
#INCLUDE B.INC
else
#INCLUDE C.INC
end if


That doesn't work that way, as includes are processed before ASP and all three files will be included in the code.

Regards,
Paco

<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  05:22:49  Show Profile  Visit inworg's Homepage
Sorry Paco,
maybe I'm going wrong but I know that #INCLUDE directive under ASP is only a system to simplify code and share a part of it with other ASP pages, so IIS does this:
a) Loads ASP page
b) Pre-process it to load #INCLUDES in the right place
c) Runs this merged code

Well, this means that ALL #INCLUDES are loaded and are in memory

...I repeat... maybe I'm in wrong...
Regards...

<
Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 17 May 2001 :  06:24:08  Show Profile
I'm not sure you got the point.

The file ssinc.dll is used to process the #include directive, so the complete page, with ALL includes added, is LATER processed by ASP. Thats why things like

<!-- #include file="<%=myfile%>" -->

don't work because includes are processed first and then ASP code. There's no point in doing:

if a then
include a
else
include b

because a and b will be included even before procesing the if.

Regards,
Paco

<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  07:12:53  Show Profile  Visit inworg's Homepage
Ok, Paco
maybe that I don't speak a good english... I apologize!

Your code doesn't work because
quote:
<!-- #include file="<%=myfile%>" -->


can work ONLY if main ASP file has been executed BEFORE the #INCLUDE directive. It doesen't! I wrote that #include directive is pre-processed (=loaded and NOT executed) BEFORE execute main ASP file. After loaded included files THEN all code (ASP + INCLUDES) will be executed.

U can try this:

file: Test.asp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY>
<% DIM A
A=100 %>
<!--#include file="A.inc"-->
<% = A %>
</BODY>
</HTML>

file: A.INC

<% A=A+200 %>


Launch in your browser http://localhost/test.asp

voilà: A=300 !!!

If the INCLUDE file was been executed BEFORE main ASP file the result must had 100.

All Above means that the executed code is like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY>
<% DIM A
A=100 %>
<% A=A+200 %>
<% = A %>
</BODY>
</HTML>

Bye

P.S. ahhhhh... Microsoft... Microsoft...


Edited by - inworg on 17 May 2001 07:17:05<
Go to Top of Page

BuffyNET
Junior Member

United Kingdom
126 Posts

Posted - 17 May 2001 :  07:26:33  Show Profile  Visit BuffyNET's Homepage  Send BuffyNET an ICQ Message
That is what Paco was saying in the first place

Neil<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  07:37:05  Show Profile  Visit inworg's Homepage
Ok... I apologize for my bad english

well so we agree that the #INCLUDE directive is a good system for internationalization ONLY if used with a language at once for each page and each user as I wrote in http://www.inworg.com/forum.pdf

P.S. Sorry...

<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  07:49:33  Show Profile  Visit inworg's Homepage
I try to give U an idea how my system works with an example....

a generic link into default.asp...
HREF="topic<%=LangStr%>.Asp....."

this, when is executed becomes like this:

HREF="topicUK.Asp....."


Second Step:
file: TopicUK.Asp

'Is like this, if U agree with arrays
LStr(1)="Now is"
LStr(2)="kkkk"
LStr(3)="Bye"
LStr(4)="hhhh"
'This file is common for each language and contains the real code of the page
<!-- #INCLUDE FILE="TOPIC.ASP" -->


file: Topic.Asp

.......
... <% LStr(1) & now()%><HREF.....
......
LStr(3)
.....


Is now the explanation cleany?

<
Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 17 May 2001 :  08:03:30  Show Profile
quote:
Is now the explanation cleany?


Yes

<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  08:28:06  Show Profile  Visit inworg's Homepage
I apologize again for my bad english.
So let me know what do u think about this system and share your ideas!

<
Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 17 May 2001 :  09:32:06  Show Profile
First, check this topic about ideas to solve this problem:

http://forum.snitz.com/forum/link.asp?TOPIC_ID=9447

The hard part comes from the fact that we can not use ASP 3.0 (no Server.execute ) and we can not use FSO .

About your solution: It could work



Edited by - paco on 17 May 2001 09:36:47<
Go to Top of Page

inworg
Junior Member

Italy
153 Posts

Posted - 17 May 2001 :  10:51:22  Show Profile  Visit inworg's Homepage
Sorry Paco... but why we need ASP 3.0 ?
I think, about my idea, only to upload language files to server.... I don't care that due to use #include is required FSO... I don't understand the problem...

<
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 17 May 2001 :  11:00:56  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Inwrong... please read both threads carefuly before asking to many questions... most of us have answered the same questions over and over lately.

Reinsnitz (Mike)
><)))'> Need a Mod?
"Therefore go and make disciples of all nations,..." Matthew 28:19a
<
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | Next Page
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07