Python\'s locale implementation seems to want to either read the locale from system settings or have it be set via a setlocale call. Neither of these work for me since I\'d like
Check how it is done in django. It looks like they use class api of gettext library and do not use the setlocale function I bet there is a reason for this.
They manually store a translation per thread check here how it is implemented (gettext function and _active dictionary).