Set the locale for the given category. The locale can be
a string, an iterable of two strings (language code and encoding),
or None.
Iterables are converted to strings using the locale aliasing
engine. Locale strings are passed directly to the C lib.
category may be given as one of the LC_* values.
>>> import locale
>>> loc = locale.setlocale(locale.LC_ALL)# get current locale# use German locale; name and availability varies with platform
>>> locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
>>> locale.strcoll('f\xe4n', 'foo')# compare a string containing an umlaut
>>> locale.setlocale(locale.LC_ALL, '')# use user's preferred locale
>>> locale.setlocale(locale.LC_ALL, 'C')# use default (C) locale
>>> locale.setlocale(locale.LC_ALL, loc)# restore saved locale