valt76 Posted March 9, 2015 Share Posted March 9, 2015 I know it may sound weird and quite out dated but I am trying to work out with ASP 3.0 ( I am a very beginner). What I am trying to achieve is as follow: I have an entry page on my web site that select the language; That leads to a welcome page where I have some text and images that change based on the language selection. (No problem here) I also have a log in form (email, password) with plenty of CSS in it that should change as well. (BIG problem here!!) I tried this lines of code but as expected did not work and returned error. <DIV class="LOGIN"> <% language=Request.form("language") languageWhere="" if language="ITA" then Response.Write "<FORM ACTION='login_action.asp' METHOD='post'> <DIV class='textboxid'> <input type='email' id='email' class='large' required='required' placeholder='Enter your email' style='width:300px;'> </DIV> <DIV class='textboxid'> <input type='password' id='textboxid' class='large' required='required' placeholder='Enter your password' style='width:300px;'> </DIV> <DIV class='cb'> <input type='checkbox' id='remember' name='remember'> <label for='remember'>remember my email in this computer</label> </div> <a href='send_password.asp' class='testo'>Ho dimenticato la password</a> <DIV> <input type='submit' value='ENTER' class='button'> </DIV> </FORM>" end if %> </DIV> Any suggestion or advice (beside giving up programming...)? Thank you in advance for the patience, understanding and kindness! Cheers Valter Link to comment Share on other sites More sharing options...
justsomeguy Posted March 9, 2015 Share Posted March 9, 2015 You're writing the text in English. If that's how you want to do a multi-lingual website then you need to write each section in the language that you're checking for. For multi-lingual sites it's common to have a function where you pass the text and the language, and the function returns the text in that language. Most often that means looking up the English text in a database and then getting the equivalent text for the selected language. Link to comment Share on other sites More sharing options...
valt76 Posted March 10, 2015 Author Share Posted March 10, 2015 Hi thank you for your reply. Actually it was my mistake I did not change the wording from English to Italian, yet the problem is that the code do not run. Lately I have tried the following lines but once again they returned error. <DIV class="LOGIN"> <% Session("Language")=Request.form("language") if Session("Language")="ITA" then <FORM ACTION="login_action.asp" METHOD="post"> <DIV class="textboxid"> <input type="email" id="email" class="large" required="required" placeholder="Inserisci la tua email" style="width:300px;"> </DIV> <DIV class="textboxid"> <input type="password" id="textboxid" class="large" required="required" placeholder="Inserisci la tua password" style="width:300px;"> </DIV> <DIV class="cb"> <input type="checkbox" id="remember" name="remember"> <label for="remember">Memorizza la mia email</label> </div> <a href="send_password.asp" class="testo">Ho dimenticato la password</a> <DIV> <input type="submit" value="REGISTRATI" class="button"> </DIV> </FORM> end if %> </DIV> Obviously I have also created an if for ENG and one for ESP (those are my selected languages). Any ideas? Thank you in advance for your help, Cheers Valter Link to comment Share on other sites More sharing options...
justsomeguy Posted March 10, 2015 Share Posted March 10, 2015 Lately I have tried the following lines but once again they returned error.What is the error? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now