Print Page | Close Window

i am trying to do a bilinguial forum

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5444
Printed Date: 02 April 2026 at 10:49pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: i am trying to do a bilinguial forum
Posted By: mrdany
Subject: i am trying to do a bilinguial forum
Date Posted: 02 September 2003 at 7:34am

hello everyone...

i am trying to do a bilingual forum (french and english), i thought that it was easy, and that i only needed to have 2 language files and include the appropriate file...

what is happening is that i cannot include the 2 files in the same page even if its in an IF statement

------------------------

so the common.asp will start by something like

<% if request.querystring("lang")="fr" then %>

<!--#include file="language_files/language_file_inc_fr.asp" -->

<% else %>

<!--#include file="language_files/language_file_inc.asp" -->

<% end if %>

--------------------------

but this will not work coz even when the final page will have one of the 2 includes... the server loads them both and is giving me an error msg (variable redefined)

anyways, this aint only the problem... there's the problem of the date variables too which are found in the database... 'january', 'february', ...

any suggestions?

Thanks

Dany




Replies:
Posted By: ljamal
Date Posted: 02 September 2003 at 7:44am
The problem with the redefined variables can be eliminated by deleting the DIM of the variables from one of the include files.

You can cirumvent the months by editing the function that returns the date.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: mrdany
Date Posted: 02 September 2003 at 8:06am

hey thanks for your reply, but that's not the only problem, i have... i will give more details below...

most of the variables are defined as constants...

ex:

const var1=value1

const var2=value2

and if i put in the second include file the same but without the const... it wont work coz its of type const

and if i do a general replace, all the const syntax to dim

it wont work coz asp doesnt accept automatic declaration and definition of the variables...

i mean by this that u cannot say dim var1=value1

you have to declare it first: dim var1

then assign it a value: var1=value1

but there are 588 different variable...

what i am trying to see is if there is any way i can skip all the redefining of the variables...

;)

Thanks again

Dany



Posted By: ljamal
Date Posted: 02 September 2003 at 8:10am
If you remove the Option Explicit from all the pages that will remove the need to declare the variables.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: mrdany
Date Posted: 02 September 2003 at 8:14am

oh that's a good idea

i didnt think of that...

cool

and chears..

Dany




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net