def default_locale(obj):
    if hasattr(obj, 'get_fallback'):
        fallback = obj.get_fallback()
        if isinstance(fallback, models.Field):
            fallback = getattr(obj, fallback.name)
        return fallback
    else:
        return settings.LANGUAGE_CODE
Get obj's default locale.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/translations/forms.py/default_locale