Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Diferent Languages in the same Site
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Diferent Languages in the same Site

 Post Reply Post Reply
Author
djsamer View Drop Down
Newbie
Newbie
Avatar

Joined: 19 July 2004
Location: Brazil
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote djsamer Quote  Post ReplyReply Direct Link To This Post Topic: Diferent Languages in the same Site
    Posted: 30 November 2004 at 9:40am
Hello my friends ...
I am working on a new Site that i must release 2 languages for it...
English  & Português...
 and i have 2 diferent files for the languages ...
Eng.asp, Pt-Br.asp
 
The problem is and every body knew that we cannot use The
<!--#Include File=""--> Dynamicly so what can i do to list the files when the users choose their own language ...
 
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 1:50pm
im not 100 % sure what you mena but what about using an if statement to select the include file to use


<%
if strLanguage = "english" then
%>
<!--#Include File="english.asp"-->
<% else %>
<!--#Include File="portugues.asp"-->
<%END IF %>



Edited by dj air - 30 November 2004 at 1:51pm
Back to Top
djsamer View Drop Down
Newbie
Newbie
Avatar

Joined: 19 July 2004
Location: Brazil
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote djsamer Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 3:05pm
Originally posted by dj air dj air wrote:

im not 100 % sure what you mena but what about using an if statement to select the include file to use


<%
if strLanguage = "english" then
%>
<!--#Include File="english.asp"-->
<% else %>
<!--#Include File="portugues.asp"-->
<%END IF %>

What u are tryng to do is puting Include files but it dosn't work...
It give an erro like name redefined or somthing like that ...because
the Include File its load until the ASP Script
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 4:31pm
That will work, if the language files use the same variables and declares them you would get that error
Back to Top
djsamer View Drop Down
Newbie
Newbie
Avatar

Joined: 19 July 2004
Location: Brazil
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote djsamer Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2004 at 6:49am
Originally posted by Mart Mart wrote:

That will work, if the language files use the same variables and declares them you would get that error
This is my problem ... the 2 language files has the same Variables ....and i must use them...
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2004 at 11:17am
I would declare the variables first i.e.


<%
Dim strValue1
Dim strValue2, strValue3, strvalue4
if strLanguage = "english" then
%>
<!--#Include File="english.asp"-->
<% else %>
<!--#Include File="portugues.asp"-->
<% End If %>


and in the language files do not declare the variables, just set them
Back to Top
djsamer View Drop Down
Newbie
Newbie
Avatar

Joined: 19 July 2004
Location: Brazil
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote djsamer Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2004 at 11:20am
Originally posted by Mart Mart wrote:

I would declare the variables first i.e.


<%
Dim strValue1
Dim strValue2, strValue3, strvalue4
if strLanguage = "english" then
%>
<!--#Include File="english.asp"-->
<% else %>
<!--#Include File="portugues.asp"-->
<% End If %>


and in the language files do not declare the variables, just set them
 
Thx ...now it's OK...
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.