Solved

Accesing Windows Location from a browser

Posted on 2004-03-31
10
158 Views
Last Modified: 2010-04-06
I need to access Location (where you can set the country you're living) data from Regional and Language Option within Windows XP Control Panel from a browser.
Can this be done?
0
Comment
Question by:huevodelata
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +4
10 Comments
 

Expert Comment

by:ekriner
ID: 10727483
If the computer is running web enabled terminal services, I guess you could do it from a browser by terminal serving into your PC and accessing the CP from a browser window.
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10728398

I think it can also be done through the ipaddress...
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10728407

Sorry I misread your questions...

But I dont think this can be done...
0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

Expert Comment

by:vicky_phadke
ID: 10730010
i have noticed this once. when i type google.com and try to view page. it automatically redirects me to google.co.in (since i m in india). i dont know how. but it does.
0
 
LVL 10

Expert Comment

by:frugle
ID: 10730048
The easy way (and most unreliable) is with JS and hope the user's browser userAgent stores the language, e.g. Mozilla/4.0 [en] (Win95; I)

You can find this with the following code:

<script language="JavaScript"><!--
var start = navigator.userAgent.indexOf('[');
if (start > -1) {
    var end = navigator.userAgent.indexOf(']');
    if (end > -1) {
        var language = navigator.userAgent.substring(start+1,end);
        document.write("<P>Language = " + language);
    }
}
//--></script>
 
To do it properly you need to read the Accept-Language header your browser sends e.g. en-gb

asp:
lang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

php:
$lang = $_SERVER["HTTP_ACCEPT_LANGUAGE"]

then redirect based on this.

Hope it helps,

Mike
0
 

Author Comment

by:huevodelata
ID: 10731870
I'm really thankful for your quick answers.
But i'll change the question a little bit.
Can i change the Language of a browser (not the Location of Windows XP) transparently to the client? This means without the Language Preference dialog box poping out.
The thing i need to do is: if a client choose a specified country in a pull-down combo, then change the Language of his browser properly, so the next time he enters the site he would be succefully redirected to the right site in the language of his country automatically, without asking him again. And i can't use cookies, sorry.
I thought a solution instatiating some Explorer object using the OBJECT tag in html in order to have more control of the browser, but that's too complicated i think.

Thanks again.
0
 
LVL 10

Expert Comment

by:frugle
ID: 10735677
You want to change the location of a users browser without asking them? I think that would cause more security issues than setting their homepage without their permission... how about I change your browser language to Korean without your permission? I'm not worried that you don't have the language pack, nor that you may not know how to change it back... a reinstall should sort you out :-)

Mike
0
 

Expert Comment

by:strolfey
ID: 10746753
I think it may be possible to do via apache configuration? Perhaps you might get some better luck there...
0
 
LVL 3

Accepted Solution

by:
Sleepyhead_NO earned 250 total points
ID: 10805678
"The thing i need to do is: if a client choose a specified country in a pull-down combo, then change the Language of his browser properly, so the next time he enters the site he would be succefully redirected to the right site in the language of his country automatically, without asking him again. And i can't use cookies, sorry."

Is this on your site (1)? Or is this on computers you are administrating (2)?

1: You have to use a cookie to save/change the setting. Alternatively automatically redirect based on IP or browser language as frugle explains in his comment.

2: Tools -> Internet Options -> Languages.

You cannot get the value from the reginonal settings in windows without a client side active-x script.
0
 

Author Comment

by:huevodelata
ID: 11398089
I realized it can't be done the way I want.

Thank all of you for your time.

G.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question