Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - i am trying to do a bilinguial forum
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

i am trying to do a bilinguial forum

 Post Reply Post Reply
Author
mrdany View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrdany Quote  Post ReplyReply Direct Link To This Post Topic: i am trying to do a bilinguial forum
    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

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mrdany View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrdany Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mrdany View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrdany Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2003 at 8:14am

oh that's a good idea

i didnt think of that...

cool

and chears..

Dany

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.