This program includes, as an option, a custom Python REPL where _ has its usual meaning, while having the possibility to change language during a session. Attempting to use the standard global gettext _ breaks that.
Furthermore, I want the user to be able to specify either a two letter code (say 'fr') or a four letter code (say fr_CA) such that if the latter were not found, it would look for the corresponding generic two-letter code (fr) before falling back to the default (en) as a last resort. As far as I know, a straight gettext.install does not allow that.
I admit that my usage might not be typical.
André Roberge