def i18n_patterns(*urls, **kwargs):
 if (not settings.USE_I18N):
  return list(urls)
 prefix_default_language = kwargs.pop('prefix_default_language', True)
 assert (not kwargs), ('Unexpected kwargs for i18n_patterns(): %s' % kwargs)
 return [LocaleRegexURLResolver(list(urls), prefix_default_language=prefix_default_language)]

def i18n_patterns ( * urls , ** kwargs ) : if ( not settings . USE_I18N ) : return list ( urls ) prefix_default_language = kwargs . pop ( 'prefix_default_language' , True ) assert ( not kwargs ) , ( 'Unexpected kwargs for i18n_patterns(): %s' % kwargs ) return [ LocaleRegexURLResolver ( list ( urls ) , prefix_default_language = prefix_default_language ) ]
adds the language code prefix to every url pattern within this function .