473,785 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Country list with iso1366 codes and local country names

Hello!

I'm developing a web page that has a goal of providing personal
content, which means that all information should be written in their
own language.

I'm about to finish my Geo targeting system that will identify where
the users are coming from based on their IP address, and for this
project I would really like to replace the English country list with a
list of the country in the local language. I'm been around on
Internet, but so far I have only been able to find the list in various
languages like French and Japanese, instead of every country listed in
the local name.
The list country names should also be combined with the iso1366 code.

http://www.cia.gov/cia/publications/...elds/2142.html
This link give me almost what I want, but it doesn't include
international characters. I would like to have the list in UTF-8
encoded format.

The kind of list I want is more like this:
http://www.kodak.com/eknec/PageQueri...uestid%3D28394

Which contains the names the way they are written in the local country,
with all the international characters, but that list is far from
complete.

Finding this appears to be more difficult than I expected, I would be
grateful if anyone can help me. Thanks!

Nov 8 '05 #1
2 3557
Hi Neil!

Thanks for getting back to me so quickly.

Neil Smith [MVP Digital Media] wrote:
I'm about to finish my Geo targeting system that will identify where
the users are coming from based on their IP address,
In fact you're *not* about to finish this. You're just about to dive
into a deep, brown-water filled hole. The reason is that IP address
blocks are regularly reallocated, and there's no authoritative list of
IPs. In addition, providers like AOL regularly report as USA IPs,
though they *can* be in the UK, Europe, Australasia or elsewhere.


Well, I will have to agree with you that it is far from complete,
especially considering that I am in the process of improving the
database to suit my needs.
The database I have chosen to use is: http://hostip.info/
which contain city information as well.

But there are problems with international characters in the city names,
and only USA is divided into regions.

For each country I would also like to include which official language
is each country has, so that Switzerland would be listed with German,
French and Italian.

I have a solution in sight for most problems, except a complete list of
country names in local language.
So instead of writing Norway, it should say Norge, and instead of
Germany, it should say Deutschland.
project I would really like to replace the English country list with a
list of the country in the local language. I'm been around on
Internet, but so far I have only been able to find the list in various
languages like French and Japanese, instead of every country listed in
the local name.
Can I save you some trouble here, as I've gone round this loop for my
videochat site. You actually want to look at the browser's reported
i18n language code not the IP address. In general this is set by the
users OS, which is (in general) set correctly by the user.


This is of course something that the framework will take into
consideration, and also put much faith in.
But with my personalization project, I want to do everything that is
possible to make the calculations as precise as possible.
Myself I am from Norway, but use an English Windows like many other
Norwegians. So that method would not help in my case.

And finally : ***what does this have to do with XML*** which is the
subject of this newsgroup ?
Now that is a good question. Except that my framework will use XML,
there is no direct connection with XML except that a search on Google
groups
showed that this group is knowledgeable about UTF - 8 encoding.

HTH
Cheers - Neil


Cheers!

Nov 8 '05 #2
Zyron wrote:
Hi Neil!
I haven't seen Neil's response, but from what I see quoted, it looks
quite reasonable.

You are simply doing the wrong thing. Massive crossposting won't help
(followups now trimmed). Claiming that you know what you are doing won't
help either; you don't. And I don't mean just referring to the wrong
standard in the Subject line.
In fact you're *not* about to finish this. You're just about to dive
into a deep, brown-water filled hole. The reason is that IP address
blocks are regularly reallocated, and there's no authoritative list of
IPs. In addition, providers like AOL regularly report as USA IPs,
though they *can* be in the UK, Europe, Australasia or elsewhere.


Well, I will have to agree with you that it is far from complete,


It is not far from nonsense.
The database I have chosen to use is: http://hostip.info/
which contain city information as well.
Do you think you can guess my city from my IP address? You're wrong, and
besides, you will probably get just a proxy address.
But there are problems with international characters in the city names,
and only USA is divided into regions.
_Your_ problem is that you are trying to achieve something completely
pointless (telling a person where she is from, as if she didn't know
better) in a wrong way.

If you are going to _use_ the geographic information for something, then
you need to _ask_ it from the user. Have do accomplished that? Please
come back when you have. Then we can discuss whether it would make sense
to try and find out some probably useful defaults.
I have a solution in sight for most problems, except a complete list of
country names in local language.
So instead of writing Norway, it should say Norge, and instead of
Germany, it should say Deutschland.
I could tell you where you can find the most reliable information on
such matters, but then I would have to killfile you, since you would use
it for something absurd.
Can I save you some trouble here, as I've gone round this loop for my
videochat site. You actually want to look at the browser's reported
i18n language code not the IP address. In general this is set by the
users OS, which is (in general) set correctly by the user. - - Myself I am from Norway, but use an English Windows like many other
Norwegians. So that method would not help in my case.


The principle of looking at the "i18n language code" (that is, the
Accept-Language header in HTTP) is right. The practice fails, for more
reasons than I care to list down. But this does not mean that you should
use some absurd methods for guessing the language.
And finally : ***what does this have to do with XML*** which is the
subject of this newsgroup ?


Now that is a good question.


The point is that you crossposted pointlessly. As so often, _none_ of
the groups was the right one.
Nov 8 '05 #3

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

Similar topics

46
3525
by: J.R. | last post by:
Hi folks, The python can only support passing value in function call (right?), I'm wondering how to effectively pass a large parameter, such as a large list or dictionary? It could achieved by pointer in C++, is there such way in Python? Thansk in advance. J.R.
1
1949
by: Daniel | last post by:
any way to get country codes from an ip in c# ?
1
11890
by: Bruce Wood | last post by:
I'm having a devil of a time calling DeviceCapabilities() in order to get the list of paper names / codes / sizes for a printer. Here is my code and the input it produces: static extern Int32 DeviceCapabilities( string device, string port, Int16 capability, out IntPtr outputBuffer,
2
1833
by: PRS | last post by:
Why does 'SELECT * FROM countries' truncate characters and SELECT country FROM countries does not ? mysql> SELECT * FROM countries; +-------------+-----------+ | country | capital | +-------------+-----------+ |ghanistan | Kabul |lbania | Tirane
4
1970
by: steve_barker333 | last post by:
Hi guys, I'm designing a web-site that will allow users to look up other people, based on certain criteria. The most important criterion is geographical location. I've managed to find a really comprehensive country list (which is great), but I'm a little stuck as to what to do for the next level down in the hierarchy.
4
22571
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for the table at the top of the table but the field names currently are 'field1' etc, so how do I rename the field names to the fields on the top row of the table. Cheers,
0
2510
by: chongming | last post by:
Hi, i want to display all the filenames on browser. However i found that if there are many filenames in that folder, result will be it will display a long list of filenames on that browser. My question is how do i iterate the file names with 5 filenames on each page? I have manage to retrieve and display the filenames with the codes below. Can anyone help me or give advice on how to do the iteration? The codes are below and able to...
3
1638
by: Mike Copeland | last post by:
How do I work with a std::list that might have multiple objects having the same "key", but which have other data that is different? Here's code that compiles, but doesn't do quite what I expect: (Please note that there's some specialized I/o code here, but the logic flow should be clear...) struct GenCheck // Gender Check data { char genCode; int useCount;
4
2472
by: runway27 | last post by:
i am using $ip= $_SERVER to retrieve the ip address of the client for example if the value returned from $ip is 50.160.190.150 i would like to find out which country the request has come from. i believe by using the third set of numbers (in this case=190) from an ip address we can find out the country name. i can declare a variable with a list of country names and the range of values, what i need help is to extract the 3rd set of numbers...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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
10330
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
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
9952
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
8976
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
7500
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...
1
4053
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
2
3654
muto222
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.