

def delayed_loader(*args, **kwargs):
    '\n    Replace each real_* function with the corresponding function from either\n    trans_real or trans_null (e.g. real_gettext is replaced with\n    trans_real.gettext or trans_null.gettext). This function is run once, the\n    first time any i18n method is called. It replaces all the i18n methods at\n    once at that time.\n    '
    import traceback
    from django.conf import settings
    if settings.USE_I18N:
        import trans_real as trans
    else:
        import trans_null as trans
    caller = traceback.extract_stack(limit=2)[0][2]
    g = globals()
    for name in __all__:
        if hasattr(trans, name):
            g[('real_%s' % name)] = getattr(trans, name)
    return g[('real_%s' % caller)](*args, **kwargs)

dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/utils/translation/__init__.py delayed_loader/original