473,473 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

LCID or country

Hi,

Does anybody know how to determine a user's country or LCID in an asp page?

I've found some articles on using:
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

but somehow this doesn't seem like a foolproof method to me.

Thanks.
Jul 19 '05 #1
4 2850
"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
Hi,

Does anybody know how to determine a user's country or LCID in an asp page?
I've found some articles on using:
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

but somehow this doesn't seem like a foolproof method to me.
It is not foolproof indeed. It's the only best way SET by the user himself!
Some others use IP address recognition (country based) but you should not
insult a user by guessing his preference language based on IP.
Thanks.


Jul 19 '05 #2
I agree about not insulting users, however my exercise has nothing to do
with language.

It is an intranet site where PC engineers can go and download software
packages for the PC's they are working on. There are different packages
depending on country (The applications are packaged to connect to different
servers etc). Therefore it would be nice to get the LCID of the requesting
PC so that they are pointed to the correct package (With the choice there to
change if need be obviously).

I appreciate this may be impossible, but if anybody knows a way that would
be great.

Thanks again.
"Egbert Nierop (MVP for IIS)" <eg***********@nospam.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
Hi,

Does anybody know how to determine a user's country or LCID in an asp page?

I've found some articles on using:
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

but somehow this doesn't seem like a foolproof method to me.


It is not foolproof indeed. It's the only best way SET by the user

himself! Some others use IP address recognition (country based) but you should not
insult a user by guessing his preference language based on IP.
Thanks.

Jul 19 '05 #3
Miguel Orrego wrote on 16 dec 2003 in
microsoft.public.inetserver.asp.general:
It is an intranet site where PC engineers can go and download software
packages for the PC's they are working on. There are different
packages depending on country (The applications are packaged to
connect to different servers etc). Therefore it would be nice to get
the LCID of the requesting PC so that they are pointed to the correct
package (With the choice there to change if need be obviously).

I appreciate this may be impossible, but if anybody knows a way that
would be great.


If you want the clientside LCID you are off topic on this NG.

btw see: GetUserDefaultLCID()

<http://msdn.microsoft.com/library/en-us/intl/nls_08tg.asp>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4
"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
I agree about not insulting users, however my exercise has nothing to do
with language.

It is an intranet site where PC engineers can go and download software
packages for the PC's they are working on. There are different packages
depending on country (The applications are packaged to connect to different servers etc). Therefore it would be nice to get the LCID of the requesting
PC so that they are pointed to the correct package (With the choice there to change if need be obviously).

I appreciate this may be impossible, but if anybody knows a way that would
be great. As Evertjan said use clientside script It must be vbscript to return that
<FORM method="post" method="yourpage.asp" id="myForm" name="myForm">
<INPUT TYPE="hidden" name="lcid" value="" id="myId">
</FORM>

<script language=vbscript>
myForm.myId.value = GetLocale()
myForm.submit(); ' have the code run to the server!
</script>
Thanks again.
"Egbert Nierop (MVP for IIS)" <eg***********@nospam.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
Hi,

Does anybody know how to determine a user's country or LCID in an asp

page?

I've found some articles on using:
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

but somehow this doesn't seem like a foolproof method to me.


It is not foolproof indeed. It's the only best way SET by the user

himself!
Some others use IP address recognition (country based) but you should not insult a user by guessing his preference language based on IP.
Thanks.



Jul 19 '05 #5

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

Similar topics

0
by: Claudio Cezar | last post by:
I live in Brazil and i am trying to set my application to work with american date format. The problem is, even when i set the LCID property at the beginning of my code, it always returns the...
2
by: grw | last post by:
Trying to locate the list of valid lcid's on MS's site and googled. Ive toiled long and hard, but alas I cannot locate the information. (previous links moved) Could anyone point me in the...
4
by: Chopper | last post by:
I realise this question has been raised many times but I am still no wiser as to why setting the locales will not work in my ASP application. I have searched on google groups etc. and tried...
1
by: Vilmar Brazão de Oliveira | last post by:
HI, @LCID for Portuguese Language? What is the @LCID for Portuguese Language? Does anybody has a table of @LCID for all Languages? Thanks, VILMAR BRAZIL PRAIA GRANDE/SP
0
by: Darren | last post by:
I used the following code on a server; <% ReturnDateTime 1033, "English (US)" ReturnDateTime 2057, "English (UK)" ReturnDateTime 3081, "English (Australia)" ReturnDateTime 1031, "German" ...
8
by: Rob | last post by:
Hi all, Is it possible to change the Session.LCID in a hyperlink? My problem is I'm calling a Date from a database to use as a querystring in the hyperlink but I also need to display the date as...
0
by: Just4U | last post by:
Hello, My config : Windows 2003 x64 (US VERSION) + sp2, IIS 6 All regional settings to French (even for default user) In my ASP pages dates are in the good format (french:dd/mm/yyyy), but...
2
by: Just4U | last post by:
Hello, I take an old post because, nobody seem to answer my problem. Config: Windows 2003 x64 (US) + sp2 Regional settings : French (for all & default users) Basically I have the following...
2
by: Thomas Troeger | last post by:
Dear all, I've stumbled over a problem with Windows Locale ID information and codepages. I'm writing a Python application that parses a CSV file, the format of a line in this file is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.