» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2006, 11:36 AM
charan charan is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
charan is on a distinguished road
Default language selection script

I'm creating a bilingual site for an Intranet. The site is created with a modified version of NukeEdit. The way it works is I have 2 completely seperate sites that are identical for both languages (other than the content of course). To make things simpler all the files and folders are named in English so the directory and file stucture for the site is the same for both languages.

On each page there is a button to switch languages. The thing is I have the button linking to the homepage. I would like it to be a bit smarter and take you to the actual page you're in.

So what I would like to do is have an ASP (or even Javascript if possible) script that would get the URL and simply change the language folder. So for example if I was in www.mysite.com/en/communication/index.asp the script would figure out the URL and take you to -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-25-2006, 11:38 AM
jared jared is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jared is on a distinguished road
Thumbs up

you could use...

javascript:
window.location.href = window.location.href.replace("/en/", "/fr/");

ASP:
Response.Redirect Request.ServerVariables("SCRIPT_NAME").Replace("/en/", "/fr/");

either of those *should* work -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GlobalWebBrands Adds New Language and Hosting Plan outsourcingplans Web Hosting News 0 02-08-2007 03:35 AM
NeuStar Introduces Five .biz Language Scripts outsourcingplans Web Hosting News 0 01-05-2007 03:46 AM
Can FTP sessions be carried to another script? kipper PHP Programming and Tips 1 08-12-2006 11:52 AM
Cron with Plesk and PHP Script yogesh PHP Programming and Tips 1 08-01-2006 05:58 PM
google language question monika Google 1 03-25-2006 01:14 PM


All times are GMT. The time now is 01:46 AM.