Thanks for the reply. I tried the above but I'm getting this error:
Code:
AttributeError: 'NullTranslations' object has no attribute '_catalog'
My knowledge of gettext and translation is very limited. I tried to look for ways to correctly get the catalog object but I failed. The python gettext docs did not offer much help for me.