SmileyChris/django-countries — pull request #44 by fenuks (2014-03-27 18:00:56+00:00)
Title: Better sorting

I added unicode-aware sorting. For example, Latvia is translated in Polish to Łotwa. Diacritic Ł letter in Polish alphabet appears after L letter, but default python sorted function is ASCII only, so Łotwa will be added at the end of list (after all countries starting at Z). It does not require additional setup, but python locale.setlocale function is platform dependent. E. g. if you have set `LANGUAGE_CODE = "en_us"` and you are running Linux you need to use Linux language format, `LANGUAGE_CODE = en_us.UTF-8`. Django works fine with this format. Alternatively, if you don't like that sorting require adjusting `LANGUAGE_CODE` it can be added to django_countries specific settings.