Home | Advertising Info8 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, April 26, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Code Samples
 PowerASP Code Help Area : Classic ASP - Code Samples
Subject Info: Multiple Language Web Site A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
Bullschmidt
Newbie
Newbie
Avatar

Joined: July/06/2004
Location: United States
Online Status: Offline
Info: 12
Added: July/06/2004 at 1:26am | IP Logged Quote Bullschmidt

If you are considering developing a multi-language Web site, perhaps have a file called something like translate.asp (which contains a function call TranslateIt()) included in each page.  Thus toward the top of a regular Web page you might have the following:
<!--#include file="translate.asp"-->

And on Web pages wherever regular text is used, use the function from translate.asp instead.

So for a button that says "Close" in English and something with the same meaning in other languages the button might look like this:
<input type="submit" name="btnClose" value="<%= TranslateIt("Close") %>">

And there could be a session variable called Language that is set somewhere:
Session("Language") = "German"

And here is the TranslateIt() function in the translate.asp include file:

Function TranslateIt(pstrStatement)
 Select Case Session("Language")
  Case "English"
   Select Case pstrStatement
    Case "Close"
     TranslateIt = "Close"
    Case "Open"
     TranslateIt = "Open"
   End Select
  Case "German"
   Select Case pstrStatement
    Case "Close"
     TranslateIt = "Ende"
    Case "Open"
     TranslateIt = "Offen"
   End Select
 End Select
End Function

Thus the above Close button would say Ende because Session("Language") is set to be German.

Perhaps a similar concept is used at Google where on the main screen one can click on Preferences and change the interface language to be something other than what you're used to.  Just for fun Google even lets you change it to be Elmer Fudd which is located in the listbox between Dutch and English.  With the interface language set to Elmer Fudd the "Google Search" button now says "Google Seawch" and the "I'm Feeling Lucky" button now says "I'm Feewing Wucky."



__________________
J. Paul Schmidt, Freelance ASP Web Developer
www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Sample (Freely Downloadable)
Back to Top View Bullschmidt's Profile Search for other info by Bullschmidt Visit Bullschmidt's Homepage
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com