Print Page | Close Window

Diferent Languages in the same Site

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12765
Printed Date: 30 March 2026 at 9:29pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Diferent Languages in the same Site
Posted By: djsamer
Subject: Diferent Languages in the same Site
Date 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 ...
 



Replies:
Posted By: dj air
Date 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 %>



Posted By: djsamer
Date 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


Posted By: Mart
Date 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


Posted By: djsamer
Date 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...


Posted By: Mart
Date 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


Posted By: djsamer
Date 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...



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