def is_language_prefix_patterns_used():
 return any((isinstance(url_pattern, LocaleRegexURLResolver) for url_pattern in get_resolver(None).url_patterns))

def is_language_prefix_patterns_used ( ) : return any ( ( isinstance ( url_pattern , LocaleRegexURLResolver ) for url_pattern in get_resolver ( None ) . url_patterns ) )
returns true if the localeregexurlresolver is used at root level of the urlpatterns .