generate a list of localized language names with links to google translate
I need to generate a list of localized language names from a list of ISO639-1 two-letter language codes. I will wrap them in links to google translate. How hard can this be? It seems like this would be something that google offers by default, but all I can find from google are lists in one language: "English, French, German, etc"
What I need is, "开发者_C百科English, Français, Deutch, etc"
Surely someone has already written a javascript / python / php function or similar?
There is a huge list here with localized names: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Wikipedia is absolutely a good source for a almost complete language list. In StackOverflow there is an answer with a list based on Wikipedia with all languages in json format. I wrote a simple function in javascript to get the English and native names for all the languages and published it as a gist: lang.js. For your purpose you can simply pass ISO639-1 language code and get the native name for the language:
getLanguageNativeName("cv"); // --> "чӑваш чӗлхи"
精彩评论