def get_default_lang():
    if UI_LANG is not None:
        return UI_LANG
    for key in 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG':
        value = os.environ.get(key)
        if not value:
            continue
        lang = value.split('_')[0].lower()
        if is_valid_language(lang):
            return lang
    return 'en'
Returns the default language the system should use.
dataset/ETHPy150Open lektor/lektor-archive/lektor/i18n.py/get_default_lang