import gettext with open('testcase.mo', 'rb') as mo: trans = gettext.GNUTranslations(mo) s = trans.ngettext('egg', 'eggs', 0) print(s)