473,799 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

language redirect

hello,

who knows if there is ascript that detects de country or language. I need
this to sent for example dutch people to a dutch site and german to a german
site.

thanx peter
Jul 20 '05 #1
6 4034
"peter" <pe******@wanad oo.nl> wrote in message news:<nd******* *************** @pollux.casema. net>...
hello,

who knows if there is ascript that detects de country or language. I need
this to sent for example dutch people to a dutch site and german to a german
site.

thanx peter


Hi Peter,

You could try using the free GeoDirection service at
http://www.geobytes.com/GeoDirection.htm to redirect users based on
their location to a page that has the appropriate language for their
country.

Kind Regards
Russell Turner
Jul 20 '05 #2
JRS: In article <c1************ **************@ posting.google. com>, seen
in news:comp.lang. javascript, Russell Turner <ru**@geobytes. com> posted
at Thu, 18 Sep 2003 09:26:29 :-
"peter" <pe******@wanad oo.nl> wrote in message news:<ndq8b.301 585$0W5.8282400 @po
llux.casema.ne t>...
who knows if there is ascript that detects de country or language. I need
this to sent for example dutch people to a dutch site and german to a german
site.

You could try using the free GeoDirection service at
http://www.geobytes.com/GeoDirection.htm to redirect users based on
their location to a page that has the appropriate language for their
country.


And what language do you assume for the UK, or Switzerland, or Finland,
or Belgium (where EU HQ is); or New York, where the UN HQ is - or even
the USA, which has a large Hispanic component?

Or any University or Laboratory, where one is very likely to find
foreign visitors and students - often using natively-configured
computers?

Or an Internet Cafe?

The ONLY sensible way is to allow the user to choose; and, moreover, to
change that choice freely.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelig ht.net/minitrue/> Update soon?
Jul 20 '05 #3
"peter" <pe******@wanad oo.nl> wrote in
news:nd******** **************@ pollux.casema.n et:
hello,

who knows if there is ascript that detects de country or language. I
need this to sent for example dutch people to a dutch site and german
to a german site.

thanx peter

The following script checks the language of the browser, and redirect
people to index_en.html, index_nl.html etc. Not written myself by the way,
found it on: http://tech.irt.org/articles/js082/index.htm and changed some
bits myself.
<SCRIPT LANGUAGE="JavaS cript1.2"><!--
// The following only works in JavaScript 1.2 or greater:
function showpage(code) {

location = ("index_" + code + ".html");
}
if (navigator.appN ame == 'Netscape')
var language = navigator.langu age;
else
var language = navigator.brows erLanguage;

var code = language.substr ing(0,2);

if (code == 'pl' || code == 'nl' || code == 'en')
showpage(code);
else
showpage('en');
//--></SCRIPT>
I'm still looking for a way to check the preferred language setting (which
you can set in the browsers preferences. I know it's in a tag
HTTP_ACCEPT_LAN GUAGE. I know how to check it with PhP, but not in
Javascript. Hope somebody can help me.

Thanks,
Edo.
Jul 20 '05 #4
Dr John Stockton <sp**@merlyn.de mon.co.uk> wrote in
news:DY******** ******@merlyn.d emon.co.uk:


And what language do you assume for the UK, or Switzerland, or
Finland, or Belgium (where EU HQ is); or New York, where the UN HQ is
- or even the USA, which has a large Hispanic component?

Or any University or Laboratory, where one is very likely to find
foreign visitors and students - often using natively-configured
computers?

Or an Internet Cafe?

The ONLY sensible way is to allow the user to choose; and, moreover,
to change that choice freely.


I think it is extra service to redirect visitors based on their browser
language and especially on their preferred language settings (that's why
they set it :).

However I agree that you must always allow visitors to change this, by
offering a link to different languages on each page.
Edo.
Jul 20 '05 #5
Edo van der Zouwen wrote:
Dr John Stockton <sp**@merlyn.de mon.co.uk> wrote in
news:DY******** ******@merlyn.d emon.co.uk:
And what language do you assume for the UK, or Switzerland, or
Finland, or Belgium (where EU HQ is); or New York, where the UN HQ is
- or even the USA, which has a large Hispanic component?

Or any University or Laboratory, where one is very likely to find
foreign visitors and students - often using natively-configured
computers?

Or an Internet Cafe?

The ONLY sensible way is to allow the user to choose; and, moreover,
to change that choice freely.
I think it is extra service to redirect visitors based on their browser
language and especially on their preferred language settings (that's why
they set it :).


I belive this should be handled server-side by configuring your server
to handle language-based content-negotiation in HTTP. That way selection
of language content variation is transparent to both the web-site user
and the web-site author. See your web server software documentation for
details.
However I agree that you must always allow visitors to change this, by
offering a link to different languages on each page.


Yes, this is a sound idea.

Regards,
Stephen

Jul 20 '05 #6
Dr John Stockton <sp**@merlyn.de mon.co.uk> wrote in message news:<DY******* *******@merlyn. demon.co.uk>...
JRS: In article <c1************ **************@ posting.google. com>, seen
in news:comp.lang. javascript, Russell Turner <ru**@geobytes. com> posted
at Thu, 18 Sep 2003 09:26:29 :-
"peter" <pe******@wanad oo.nl> wrote in message news:<ndq8b.301 585$0W5.8282400 @po
llux.casema.ne t>...

who knows if there is ascript that detects de country or language. I need
this to sent for example dutch people to a dutch site and german to a german
site.

You could try using the free GeoDirection service at
http://www.geobytes.com/GeoDirection.htm to redirect users based on
their location to a page that has the appropriate language for their
country.


And what language do you assume for the UK, or Switzerland, or Finland,
or Belgium (where EU HQ is); or New York, where the UN HQ is - or even
the USA, which has a large Hispanic component?

Or any University or Laboratory, where one is very likely to find
foreign visitors and students - often using natively-configured
computers?

Or an Internet Cafe?

The ONLY sensible way is to allow the user to choose; and, moreover, to
change that choice freely.


A good point Peter. Sorry if my post was felt to be out of place. I
suggested our GeoDirection service because a client only recently
wanted to use GeoDirection for this very reason, he wanted to redirect
users from certain countries to language pages using our services. I
thought my input may be helpful to others. GeoDirection won't restrict
a visitors choice based on their location (unless the webmaster wants
to) - it will select for the webmaster what he/she wants their
visitors to see based upon their detected geographic location - it is
the webmasters discretion to include links to other pages of any form.

Kind Regards
Russell Turner
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
9382
by: Bob Garbados | last post by:
forgive my ignorance, as I'm new to php coming from a ms background... If I create a page named redirect.php and it's only content is: <?php header("Location: http://www.google.com"); ?> Should it not redirect to www.google.com? I can't get the header() function to redirect. I'm trying to take an online reservation... the customer fills out
6
6942
by: Peter Row | last post by:
Hi, I am writing a DLL in VB.NET that implements IHttpHandler.ProcessRequest. This code calls a sub and I need to know if that sub did a response redirect or not. Specifically I need to know that either the sub did a redirect or a specific value was specified in the URL. If neither a redirect was done and a certain value was
5
4574
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks a session variable, and if it is not present, does a Response.Redirect to a webpage for the CAS passing a url parameter for the url to post back to. The CAS provides a page for the user to log into, validates the username and password, and then...
2
3139
by: scar5308 | last post by:
I have been struggling with this problem for over a week and am not much nearer a solution. I am trying to create a multi language site that only requires the content to be added as simple text or html files although php files can be included. I have a page that detects the language used on the users browser: <? class object {}; $config = new object; $config->dir = "/home/path/public_html/language2/lang_sets/"; if (! isset($lang)) {...
6
1582
by: ThunderMusic | last post by:
Hi, I'm currently developping a web site (not a web application) with asp.net and would like to use the localization functionalities to avoid doing my pages twice (and maybe eventually, 3 times). But I would also like the user to have urls like www.thedomainIregistered.com/en/thepage.aspx or www.thedomainIregistered.com/fr/thepage.aspx that would lead to the same aspx (even if the url in the url bar stays the same) in the end but would...
7
1901
by: ThunderMusic | last post by:
Hi, Ok, I find myself having a lot of troubles with URL Rewriting and I've seen on the net that in some situations, indexers have difficulty indexing sites because of some flaws in the url rewriting mecanism... Does anybody have a solution to my problem? I mean, I want to be able to localize my web site without having to dupplicate all the pages in 2-3 (fr, en, sp(optional)) directories and so the indexers can index the right content...
10
9025
by: Eirik Eldorsen | last post by:
How can I 301 redirect www.example.com/default.aspx to www.example.com without using ISAPI filters?
4
2324
by: edgy | last post by:
Hello, I am a beginner with PHP, and I have made a language switcher on a site that I am looking for your feedback on. First of all, the page is http://www.mankar.ca My question regarding usage is - well, does it work? Can you continue browsing in your selected language? I am especially interested in people using an IE browser with a locale setting that is not english or french.
1
2428
by: Martin Bachwerk | last post by:
Hey Philip, thanks for the snipplet, but I have tried that code already. It does indeed give me a swedish version.. of www.google.de :) That's the beauty about Google that they have all languages for all domains available. However if I try it with www.gizmodo.com (a tech blog in several languages) I still get the German version. Both sites obviously redirect the client to the country-based version
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10031
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9079
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.