getnikola/nikola — pull request #759 by ccanepa (2013-09-24 13:08:25+00:00)
Title: fix guess languaje from locale in py2

calling locale.get_locale() before setting any locale returns (None, None) in python 2.x , so the first call to utils.Functionary.current_lang always returned default_lang in python 2.x

See the python bugtracker issues 6203, 12699.

From the python docs setlocale, section
"""
The program must explicitly say that it wants the user’s preferred locale settings by calling setlocale(LC_ALL, '')
"""
so I set that locale if detecting a None.