

def get_first_language(self, site_id=None):
    '\n        Return the first language for the current site.\n        This can be used for user interfaces, where the languages are displayed in tabs.\n        '
    if (site_id is None):
        site_id = getattr(settings, 'SITE_ID', None)
    try:
        return self[site_id][0]['code']
    except (KeyError, IndexError):
        return self['default']['code']

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