def getTranslation(language):
    global g_Translations
    if language not in g_Translations:
        filename = os.path.join(sys.path[0], 'assets', 'locales', language, 'plexconnect.mo')
        try:
            fp = open(filename, 'rb')
            g_Translations[language] = gettext.GNUTranslations(fp)
            fp.close()
        except __HOLE__:
            g_Translations[language] = gettext.NullTranslations()
    return g_Translations[language]
dataset/ETHPy150Open iBaa/PlexConnect/Localize.py/getTranslation