473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 3527
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
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...
1
by: Daniel | last post by:
any way to get country codes from an ip in c# ?
1
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...
2
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 |...
4
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...
4
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...
0
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...
3
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:...
4
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....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...

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.