

def get_active_choices(self, language_code=None, site_id=None):
    '\n        Find out which translations should be visible in the site.\n        It returns a list with either a single choice (the current language),\n        or a list with the current language + fallback language.\n        '
    if (language_code is None):
        language_code = get_language()
    lang_dict = self.get_language(language_code, site_id=site_id)
    if (not lang_dict['hide_untranslated']):
        return ([language_code] + [lang for lang in lang_dict['fallbacks'] if (lang != language_code)])
    else:
        return [language_code]

dataset/ETHPy150Open edoburu/django-parler/parler/utils/conf.py LanguagesSetting.get_active_choices/original