Link to home
Start Free TrialLog in
Avatar of Dinesh Kumar
Dinesh KumarFlag for India

asked on

classic asp

Hello Experts,

I have a website having 5 webpages, I want to give users the facility to convert these pages to spanish language whenever they want i.e website in two language.

Can I do this in classic ASP?  if yes can you provide some guidelines so that I can achieve it.

regards
dinesh
ASKER CERTIFIED SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dinesh Kumar

ASKER

I think I can use XML to store language specific content as XML is much faster than Database.

It would be better if you can tell me how to parse the JSON in asp which is lightweight and parsing should be easy in it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nap0leon
nap0leon

Do you want to literally translate the page on the fly or do you want to have two versions of the page and serve up the appropriate language's content?

If you will have the content pre-translated, you may want to place the content in your HTML into two separate DIVs and merely display the DIV that contains the user's preferred language.

For example,
If the page defaults to English and it has a "En Espanol" link/button, you run some simple javascript that hides the <div id="english"> and displays the <div id="spanish">
function swapLangauge(lang) {
  if (lang=='spanish'){
    document.getElementById('english').style.display = 'none';
    document.getElementById('spanish').style.display = 'block';
  } else {
    document.getElementById('spanish').style.display = 'none';
    document.getElementById('english').style.display = 'block';
  }
}

Open in new window

Thanks.