Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding list of languages #35

Closed
fenuks opened this issue Jan 2, 2014 · 5 comments
Closed

Adding list of languages #35

fenuks opened this issue Jan 2, 2014 · 5 comments

Comments

@fenuks
Copy link

fenuks commented Jan 2, 2014

Hi,
I think it would be great if this app also have a languages list (and LanguageField). It's highly related to countries and very often when you need list of countries, you would also need languages list. Moreover, for time being, django don't have good app with translated list of languages (at least I could not find one). Easy to parse registry of languages can be found at iana.org.

@SmileyChris
Copy link
Owner

I'm not against this, but I'm not completely convinced either.

Using an ISO approved list of languages would be an acceptable addition, I guess. It isn't something I'm particularly interested in adding but if someone wants to champion it then be my guest.

@fenuks
Copy link
Author

fenuks commented Apr 1, 2014

I wrote a script to generate list of languages from site mentioned above. By default is only fetches languages with two characters long codes, since longer are redundant. You can run it as normal script, ./generate_langs.py and it will save ready-to-use file langs.py in parent directory. I didn't write LangField, but it will be pretty much the same as CountryField.

BTW, is the country list generated or manually created? It would be quite nice to have an alternative countries list with continents and maybe languages assigned to each country.

@SmileyChris
Copy link
Owner

I'd be more keen to see this generated from an official ISO 639-2 list. Otherwise you start opening a can of worms as to what should be in the list and what shouldn't.

The country list is generated from a CSV of the official ISO 3166-1 list: data.py file is executed which self-generates (see https://github.com/SmileyChris/django-countries/blob/master/django_countries/data.py).

Stepping back, I'm wondering what the real benefit is of having a large list of languages if they can't be tied to a country. So for now, I'm going to say the only way this will get added is if there can be a relationship between countries and languages -- otherwise it could be a totally standalone app.

@SmileyChris
Copy link
Owner

If a more concrete proposal comes in, the issue can be addressed again. Since this one is quite abstract I'm going to close it for now.

@Oyabi
Copy link

Oyabi commented Jul 3, 2014

You can maybe use : http://msdn.microsoft.com/en-us/library/cc233982.aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants