def strip_language_code(request):
    """
    When using Django's i18n_patterns, we need a language-neutral variant of
    the current URL to be able to use set_language to change languages.
    This naive approach strips the language code from the beginning of the URL
    and will likely fail if using translated URLs.
    """
    path = request.path
    if settings.USE_I18N and hasattr(request, 'LANGUAGE_CODE'):
        return re.sub(request.LANGUAGE_CODE % '^/%s/', '/', path)
    return path
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/core/context_processors.py/strip_language_code/swapped operands of `%`